{"sha":"51e936705d53019468b476a2c41714eb597dd1b6","node_id":"MDY6Q29tbWl0MzU2ODEzNzY6NTFlOTM2NzA1ZDUzMDE5NDY4YjQ3NmEyYzQxNzE0ZWI1OTdkZDFiNg==","commit":{"author":{"name":"Felix Petriconi","email":"FelixPetriconi@users.noreply.github.com","date":"2020-10-08T09:22:35Z"},"committer":{"name":"GitHub","email":"noreply@github.com","date":"2020-10-08T09:22:35Z"},"message":"Merge pull request #320 from stlab/develop\n\n1.5.4 Release merge","tree":{"sha":"fb3d471119db756d1e58c10f4fe1fc75dc1dcefe","url":"https://api.github.com/repos/stlab/stlab/git/trees/fb3d471119db756d1e58c10f4fe1fc75dc1dcefe"},"url":"https://api.github.com/repos/stlab/stlab/git/commits/51e936705d53019468b476a2c41714eb597dd1b6","comment_count":0,"verification":{"verified":true,"reason":"valid","signature":"-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJfftpbCRBK7hj4Ov3rIwAAdHIIAHVZ1lAPXTvfEY0cRjC5fqvA\nYZrLGZn+UtuOf/8WtMGbP9Ijifq+YHgb9vjAuG8p/3NhhU2Yi/l11w0G2z3ZDeDd\nLmYiotWcs6P3pvqf8x7ew4sPPUaz7JHJtK4V9q1aQajFXvt0eKBBHB2BuavBGm4U\n4OGBriKQ5Hpcpy5f4SzOuzfb05XAW/LIcvBPKJVTbj9tSGC43H2EvmtF4QxPzPFU\nQYP4861oqpOpGyWfXtt2IYJmHmJYNjDiJNBNdtqfDAwUASu1Cj9n6dCW+VJRcqCw\nJv70V6VCM1dKaIau8ashXAzmvs3MVZTY0jh1u9NvuPRuP37BI2f5YGKUxDKTnvo=\n=oY5d\n-----END PGP SIGNATURE-----\n","payload":"tree fb3d471119db756d1e58c10f4fe1fc75dc1dcefe\nparent e91c2205c8c73143b0eb4b472424ea2f4feff3ec\nparent 925f5443a56f8936e517f85f2a03be2887e0b76e\nauthor Felix Petriconi <FelixPetriconi@users.noreply.github.com> 1602148955 +0200\ncommitter GitHub <noreply@github.com> 1602148955 +0200\n\nMerge pull request #320 from stlab/develop\n\n1.5.4 Release merge","verified_at":"2024-01-16T19:59:59Z"}},"url":"https://api.github.com/repos/stlab/stlab/commits/51e936705d53019468b476a2c41714eb597dd1b6","html_url":"https://github.com/stlab/stlab/commit/51e936705d53019468b476a2c41714eb597dd1b6","comments_url":"https://api.github.com/repos/stlab/stlab/commits/51e936705d53019468b476a2c41714eb597dd1b6/comments","author":{"login":"FelixPetriconi","id":612377,"node_id":"MDQ6VXNlcjYxMjM3Nw==","avatar_url":"https://avatars.githubusercontent.com/u/612377?v=4","gravatar_id":"","url":"https://api.github.com/users/FelixPetriconi","html_url":"https://github.com/FelixPetriconi","followers_url":"https://api.github.com/users/FelixPetriconi/followers","following_url":"https://api.github.com/users/FelixPetriconi/following{/other_user}","gists_url":"https://api.github.com/users/FelixPetriconi/gists{/gist_id}","starred_url":"https://api.github.com/users/FelixPetriconi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FelixPetriconi/subscriptions","organizations_url":"https://api.github.com/users/FelixPetriconi/orgs","repos_url":"https://api.github.com/users/FelixPetriconi/repos","events_url":"https://api.github.com/users/FelixPetriconi/events{/privacy}","received_events_url":"https://api.github.com/users/FelixPetriconi/received_events","type":"User","user_view_type":"public","site_admin":false},"committer":{"login":"web-flow","id":19864447,"node_id":"MDQ6VXNlcjE5ODY0NDQ3","avatar_url":"https://avatars.githubusercontent.com/u/19864447?v=4","gravatar_id":"","url":"https://api.github.com/users/web-flow","html_url":"https://github.com/web-flow","followers_url":"https://api.github.com/users/web-flow/followers","following_url":"https://api.github.com/users/web-flow/following{/other_user}","gists_url":"https://api.github.com/users/web-flow/gists{/gist_id}","starred_url":"https://api.github.com/users/web-flow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/web-flow/subscriptions","organizations_url":"https://api.github.com/users/web-flow/orgs","repos_url":"https://api.github.com/users/web-flow/repos","events_url":"https://api.github.com/users/web-flow/events{/privacy}","received_events_url":"https://api.github.com/users/web-flow/received_events","type":"User","user_view_type":"public","site_admin":false},"parents":[{"sha":"e91c2205c8c73143b0eb4b472424ea2f4feff3ec","url":"https://api.github.com/repos/stlab/stlab/commits/e91c2205c8c73143b0eb4b472424ea2f4feff3ec","html_url":"https://github.com/stlab/stlab/commit/e91c2205c8c73143b0eb4b472424ea2f4feff3ec"},{"sha":"925f5443a56f8936e517f85f2a03be2887e0b76e","url":"https://api.github.com/repos/stlab/stlab/commits/925f5443a56f8936e517f85f2a03be2887e0b76e","html_url":"https://github.com/stlab/stlab/commit/925f5443a56f8936e517f85f2a03be2887e0b76e"}],"stats":{"total":78,"additions":70,"deletions":8},"files":[{"sha":"7c759ac791ed8d1bf86756bc2cab4e69d592d050","filename":"CHANGES.md","status":"modified","additions":4,"deletions":0,"changes":4,"blob_url":"https://github.com/stlab/stlab/blob/51e936705d53019468b476a2c41714eb597dd1b6/CHANGES.md","raw_url":"https://github.com/stlab/stlab/raw/51e936705d53019468b476a2c41714eb597dd1b6/CHANGES.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/CHANGES.md?ref=51e936705d53019468b476a2c41714eb597dd1b6","patch":"@@ -1,3 +1,7 @@\n+## v1.5.4 - 2020 - October 08\n+- Fixed issues\n+    - [#317](https://github.com/stlab/libraries/issues/317): when_all(range) and when_any(range) must not be used with an immediate_executor\n+    \n ## v1.5.3 - 2020 - September 16\n - Fixed issues\n     - [#312](https://github.com/stlab/libraries/issues/312): default_executor implementation for Windows has a memory leak"},{"sha":"1cf78fc4d72401355ea5e5327c05aada4943ad34","filename":"CMakeLists.txt","status":"modified","additions":1,"deletions":1,"changes":2,"blob_url":"https://github.com/stlab/stlab/blob/51e936705d53019468b476a2c41714eb597dd1b6/CMakeLists.txt","raw_url":"https://github.com/stlab/stlab/raw/51e936705d53019468b476a2c41714eb597dd1b6/CMakeLists.txt","contents_url":"https://api.github.com/repos/stlab/stlab/contents/CMakeLists.txt?ref=51e936705d53019468b476a2c41714eb597dd1b6","patch":"@@ -14,7 +14,7 @@ else()\n   set( subproject OFF )\n endif()\n \n-project( stlab VERSION 1.5.3 LANGUAGES CXX )\n+project( stlab VERSION 1.5.4 LANGUAGES CXX )\n \n include( CTest )\n include( CMakeDependentOption )"},{"sha":"b039b76006b4268823bf22eb4601bc638d94e5dd","filename":"stlab/concurrency/future.hpp","status":"modified","additions":7,"deletions":5,"changes":12,"blob_url":"https://github.com/stlab/stlab/blob/51e936705d53019468b476a2c41714eb597dd1b6/stlab%2Fconcurrency%2Ffuture.hpp","raw_url":"https://github.com/stlab/stlab/raw/51e936705d53019468b476a2c41714eb597dd1b6/stlab%2Fconcurrency%2Ffuture.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Ffuture.hpp?ref=51e936705d53019468b476a2c41714eb597dd1b6","patch":"@@ -1277,8 +1277,7 @@ auto apply_when_any_arg(F& f, P& p) {\n \n template <std::size_t i, typename E, typename P, typename T>\n void attach_when_arg_(E&& executor, std::shared_ptr<P>& p, T a) {\n-    std::unique_lock lock{ p->_guard };\n-    p->_holds[i] = std::move(a).recover(std::forward<E>(executor), [_w = std::weak_ptr<P>(p)](auto x) {\n+    auto&& holds = std::move(a).recover(std::forward<E>(executor), [_w = std::weak_ptr<P>(p)](auto x) {\n         auto p = _w.lock();\n         if (!p) return;\n \n@@ -1288,6 +1287,8 @@ void attach_when_arg_(E&& executor, std::shared_ptr<P>& p, T a) {\n             p->template done<i>(std::move(x));\n         }\n     });\n+    std::unique_lock lock{ p->_guard };\n+    p->_holds[i] = std::move(holds);\n }\n \n template <typename E, typename P, typename... Ts, std::size_t... I>\n@@ -1561,9 +1562,7 @@ struct common_context : CR {\n \n template <typename C, typename E, typename T>\n void attach_tasks(size_t index, E executor, const std::shared_ptr<C>& context, T&& a) {\n-    std::unique_lock guard(context->_guard);\n-    context->_holds[index] =\n-        std::move(a).recover(std::move(executor), [_context = make_weak_ptr(context), _i = index](auto x) {\n+    auto&& hold = std::move(a).recover(std::move(executor), [_context = make_weak_ptr(context), _i = index](auto x) {\n             auto p = _context.lock();\n             if (!p) return;\n             if (auto ex = x.exception(); ex) {\n@@ -1572,6 +1571,9 @@ void attach_tasks(size_t index, E executor, const std::shared_ptr<C>& context, T\n                 p->done(std::move(x), _i);\n             }\n         });\n+\n+    std::unique_lock guard(context->_guard);\n+    context->_holds[index] = std::move(hold);\n }\n \n template <typename R, typename T, typename C, typename Enabled = void>"},{"sha":"1e4427f96c7edc5b317c31cac3fde65886fae3bf","filename":"stlab/version.hpp","status":"modified","additions":2,"deletions":2,"changes":4,"blob_url":"https://github.com/stlab/stlab/blob/51e936705d53019468b476a2c41714eb597dd1b6/stlab%2Fversion.hpp","raw_url":"https://github.com/stlab/stlab/raw/51e936705d53019468b476a2c41714eb597dd1b6/stlab%2Fversion.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fversion.hpp?ref=51e936705d53019468b476a2c41714eb597dd1b6","patch":"@@ -19,13 +19,13 @@\n //  STLAB_VERSION / 100 % 1000 is the minor version\n //  STLAB_VERSION / 100000 is the major version\n \n-#define STLAB_VERSION 100503\n+#define STLAB_VERSION 100504\n \n //\n //  STLAB_LIB_VERSION must be defined to be the same as STLAB_VERSION\n //  but as a *string* in the form \"x_y[_z]\" where x is the major version\n //  number, y is the minor version number, and z is the patch level if not 0.\n \n-#define STLAB_LIB_VERSION \"1_5_3\"\n+#define STLAB_LIB_VERSION \"1_5_4\"\n \n #endif"},{"sha":"96206a9ca43962daaf12ad88c8ed90fcf604626e","filename":"test/future_when_all_range_tests.cpp","status":"modified","additions":56,"deletions":0,"changes":56,"blob_url":"https://github.com/stlab/stlab/blob/51e936705d53019468b476a2c41714eb597dd1b6/test%2Ffuture_when_all_range_tests.cpp","raw_url":"https://github.com/stlab/stlab/raw/51e936705d53019468b476a2c41714eb597dd1b6/test%2Ffuture_when_all_range_tests.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ffuture_when_all_range_tests.cpp?ref=51e936705d53019468b476a2c41714eb597dd1b6","patch":"@@ -133,6 +133,32 @@ BOOST_AUTO_TEST_CASE(future_when_all_void_range_with_many_elements) {\n     BOOST_REQUIRE_LE(1, custom_scheduler<1>::usage_counter());\n }\n \n+BOOST_AUTO_TEST_CASE(future_when_all_void_range_with_many_elements_and_immediate_continuation) {\n+    BOOST_TEST_MESSAGE(\"running future when_all void with range with many elements and immediate continuation\");\n+    size_t p = 0;\n+    size_t r = 0;\n+    std::vector<stlab::future<int>> futures;\n+    for (auto i = 0; i < 1000; ++i) {\n+        futures.push_back(async(make_executor<0>(), [] { return 1; }));\n+    }\n+\n+    sut = when_all(immediate_executor,\n+                   [& _p = p, &_r = r](std::vector<int> v) {\n+                       _p = v.size();\n+                       for (auto i : v) {\n+                           _r += i;\n+                       }\n+                   },\n+                   std::make_pair(futures.begin(), futures.end()));\n+\n+    check_valid_future(sut);\n+    wait_until_future_completed(sut);\n+\n+    BOOST_REQUIRE_EQUAL(size_t(1000), p);\n+    BOOST_REQUIRE_EQUAL(size_t(1000), r);\n+    BOOST_REQUIRE_LE(1000, custom_scheduler<0>::usage_counter());\n+}\n+\n /*\n        /  F1  \\\n       / / F2 \\ \\\n@@ -554,4 +580,34 @@ BOOST_AUTO_TEST_CASE(future_when_all_void_range_with_diamond_formation_elements_\n     BOOST_REQUIRE_LE(1, custom_scheduler<1>::usage_counter());\n }\n \n+BOOST_AUTO_TEST_CASE(future_when_all_void_range_with_one_fails_ofmany_elements_and_immediate_continuation) {\n+    BOOST_TEST_MESSAGE(\"running future when_all void with range with one fails one of manyelements and immediate continuation\");\n+    size_t p = 0;\n+    size_t r = 0;\n+    std::vector<stlab::future<int>> futures;\n+    for (auto i = 0; i < 500; ++i) {\n+        futures.push_back(async(make_executor<0>(), [] { return 1; }));\n+    }\n+    futures.push_back(async(make_executor<0>(), []()->int { throw test_exception(\"failure\"); }));\n+\n+    for (auto i = 0; i < 499; ++i) {\n+        futures.push_back(async(make_executor<0>(), [] { return 1; }));\n+    }\n+\n+    sut = when_all(immediate_executor,\n+                   [& _p = p, &_r = r](std::vector<int> v) {\n+                       _p = v.size();\n+                       for (auto i : v) {\n+                           _r += i;\n+                       }\n+                   },\n+                   std::make_pair(futures.begin(), futures.end()));\n+\n+    wait_until_future_fails<test_exception>(sut);\n+\n+    check_failure<test_exception>(sut, \"failure\");\n+    BOOST_REQUIRE_EQUAL(0, r);\n+}\n+\n+\n BOOST_AUTO_TEST_SUITE_END()"}]}