{"sha":"3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e","node_id":"MDY6Q29tbWl0MzU2ODEzNzY6M2NiOGQ5YjIxODU4MWQyYjJmMDRmZTY4ZmZhOTljOGI5NjA4ZjU1ZQ==","commit":{"author":{"name":"Felix Petriconi","email":"FelixPetriconi@users.noreply.github.com","date":"2018-07-28T20:41:16Z"},"committer":{"name":"GitHub","email":"noreply@github.com","date":"2018-07-28T20:41:16Z"},"message":"Merge pull request #178 from stlab/develop\n\nPatch release 1.3.2","tree":{"sha":"ca9c8a3e529b342ee9e88f4e73cef7765aa4a033","url":"https://api.github.com/repos/stlab/stlab/git/trees/ca9c8a3e529b342ee9e88f4e73cef7765aa4a033"},"url":"https://api.github.com/repos/stlab/stlab/git/commits/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e","comment_count":0,"verification":{"verified":true,"reason":"valid","signature":"-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJbXNTsCRBK7hj4Ov3rIwAAdHIIAKjTOu3jbDivOCKNLKbNK8HL\nG3rMgEY+MpiGUQvAGsUJ1GpKzfmg/WpIUuYqORXaLqwT2OZoet446IimycvR9L0t\ncdFUvcEkNFENJviyEcLMMRsPmx+ZdJY3wW/aGM5BTZYh3rllpsDCc8Ngw4R89k6s\n5zcb6Zpv1869Tds9Iew7LYTBwm11YFC0DaGtLyrOMufWfgXtni63jkCBfUDZQ91D\nO7QAaTw/2gNsAoRY9y7AMjHrW+9L2/O9JFJlwciMBiCW5V//PWVnobxls2/+vwxK\nxrk+RHsxId2KTXjoQB0mHhaY1Xd7LEWWNrsGDIzuWa48TV8BGjp/A76ZMmgZtlY=\n=krz2\n-----END PGP SIGNATURE-----\n","payload":"tree ca9c8a3e529b342ee9e88f4e73cef7765aa4a033\nparent fdb3ab411777a68305b1dd0c77417d12ef5ba9b3\nparent c25c48c16d1869eed50dd182f48c48675c279c70\nauthor Felix Petriconi <FelixPetriconi@users.noreply.github.com> 1532810476 +0200\ncommitter GitHub <noreply@github.com> 1532810476 +0200\n\nMerge pull request #178 from stlab/develop\n\nPatch release 1.3.2","verified_at":"2024-01-16T19:59:59Z"}},"url":"https://api.github.com/repos/stlab/stlab/commits/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e","html_url":"https://github.com/stlab/stlab/commit/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e","comments_url":"https://api.github.com/repos/stlab/stlab/commits/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/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":"fdb3ab411777a68305b1dd0c77417d12ef5ba9b3","url":"https://api.github.com/repos/stlab/stlab/commits/fdb3ab411777a68305b1dd0c77417d12ef5ba9b3","html_url":"https://github.com/stlab/stlab/commit/fdb3ab411777a68305b1dd0c77417d12ef5ba9b3"},{"sha":"c25c48c16d1869eed50dd182f48c48675c279c70","url":"https://api.github.com/repos/stlab/stlab/commits/c25c48c16d1869eed50dd182f48c48675c279c70","html_url":"https://github.com/stlab/stlab/commit/c25c48c16d1869eed50dd182f48c48675c279c70"}],"stats":{"total":296,"additions":165,"deletions":131},"files":[{"sha":"f2ac931da6480a9d27df0b61ffbe18d4befffa25","filename":"CHANGES.md","status":"modified","additions":5,"deletions":0,"changes":5,"blob_url":"https://github.com/stlab/stlab/blob/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/CHANGES.md","raw_url":"https://github.com/stlab/stlab/raw/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/CHANGES.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/CHANGES.md?ref=3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e","patch":"@@ -1,3 +1,8 @@\n+## v1.3.2 - 2018 - July - 28\n+\n+- Fixed Issues \n+   - [#169](https://github.com/stlab/libraries/issues/169) : when_all() appears to ignore the passed-in executor\n+\n ## v1.3.1 - 2018 - July - 21\n \n - Fixed Issues "},{"sha":"9829d77192abad329ff5ff0f6116d96bba7ea50f","filename":"stlab/concurrency/future.hpp","status":"modified","additions":113,"deletions":123,"changes":236,"blob_url":"https://github.com/stlab/stlab/blob/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/stlab%2Fconcurrency%2Ffuture.hpp","raw_url":"https://github.com/stlab/stlab/raw/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/stlab%2Fconcurrency%2Ffuture.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Ffuture.hpp?ref=3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e","patch":"@@ -217,8 +217,8 @@ struct value_setter;\n \n /**************************************************************************************************/\n \n-template <typename Sig, typename S, typename F>\n-auto package(S&&, F &&)\n+template <typename Sig, typename E, typename F>\n+auto package(E&&, F &&)\n     -> std::pair<detail::packaged_task_from_signature_t<Sig>, future<detail::result_of_t_<Sig>>>;\n \n /**************************************************************************************************/\n@@ -273,9 +273,9 @@ struct shared_base<T, enable_if_copyable<T>> : std::enable_shared_from_this<shar\n         return then(_executor, std::move(f));\n     }\n \n-    template <typename S, typename F>\n-    auto then(S&& s, F&& f) {\n-        return recover(std::forward<S>(s),\n+    template <typename E, typename F>\n+    auto then(E&& executor, F&& f) {\n+        return recover(std::forward<E>(executor),\n                        [_f = std::forward<F>(f)](const auto& x) { return _f(x._p->get_ready()); });\n     }\n \n@@ -284,20 +284,20 @@ struct shared_base<T, enable_if_copyable<T>> : std::enable_shared_from_this<shar\n         return recover(_executor, std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto recover(S s, F&& f) {\n+    template <typename E, typename F>\n+    auto recover(E executor, F&& f) {\n         auto p = package<std::result_of_t<F(future<T>)>()>(\n-            s, [_f = std::forward<F>(f), _p = future<T>(this->shared_from_this())]() mutable {\n+            executor, [_f = std::forward<F>(f), _p = future<T>(this->shared_from_this())]() mutable {\n                 return std::move(_f)(std::move(_p));\n             });\n \n         bool ready;\n         {\n             std::unique_lock<std::mutex> lock(_mutex);\n             ready = _ready;\n-            if (!ready) _then.emplace_back(std::move(s), std::move(p.first));\n+            if (!ready) _then.emplace_back(std::move(executor), std::move(p.first));\n         }\n-        if (ready) s(std::move(p.first));\n+        if (ready) executor(std::move(p.first));\n \n         return reduce(std::move(p.second));\n     }\n@@ -307,9 +307,9 @@ struct shared_base<T, enable_if_copyable<T>> : std::enable_shared_from_this<shar\n         return then_r(unique, _executor, std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto then_r(bool unique, S&& s, F&& f) {\n-        return recover_r(unique, std::forward<S>(s), [_f = std::forward<F>(f)](auto&& x) mutable {\n+    template <typename E, typename F>\n+    auto then_r(bool unique, E&& executor, F&& f) {\n+        return recover_r(unique, std::forward<E>(executor), [_f = std::forward<F>(f)](auto&& x) mutable {\n             return _f(std::move(*(std::forward<decltype(x)>(x).get_try())));\n         });\n     }\n@@ -319,22 +319,22 @@ struct shared_base<T, enable_if_copyable<T>> : std::enable_shared_from_this<shar\n         return recover_r(unique, _executor, std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto recover_r(bool unique, S&& s, F&& f) {\n-        if (!unique) return recover(std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto recover_r(bool unique, E&& executor, F&& f) {\n+        if (!unique) return recover(std::forward<E>(executor), std::forward<F>(f));\n \n         auto p = package<std::result_of_t<F(future<T>)>()>(\n-            s, [_f = std::forward<F>(f), _p = future<T>(this->shared_from_this())]() mutable {\n+            executor, [_f = std::forward<F>(f), _p = future<T>(this->shared_from_this())]() mutable {\n                 return _f(std::move(_p));\n             });\n \n         bool ready;\n         {\n             std::unique_lock<std::mutex> lock(_mutex);\n             ready = _ready;\n-            if (!ready) _then.emplace_back(std::move(s), std::move(p.first));\n+            if (!ready) _then.emplace_back(std::move(executor), std::move(p.first));\n         }\n-        if (ready) s(std::move(p.first));\n+        if (ready) executor(std::move(p.first));\n \n         return reduce(std::move(p.second));\n     }\n@@ -432,9 +432,9 @@ struct shared_base<T, enable_if_not_copyable<T>> : std::enable_shared_from_this<\n         return then_r(unique, _executor, std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto then_r(bool unique, S&& s, F&& f) {\n-        return recover_r(unique, std::forward<S>(s), [_f = std::forward<F>(f)](auto&& x) mutable {\n+    template <typename E, typename F>\n+    auto then_r(bool unique, E&& executor, F&& f) {\n+        return recover_r(unique, std::forward<E>(executor), [_f = std::forward<F>(f)](auto&& x) mutable {\n             return std::move(_f)(std::move(*std::forward<decltype(x)>(x).get_try()));\n         });\n     }\n@@ -444,21 +444,21 @@ struct shared_base<T, enable_if_not_copyable<T>> : std::enable_shared_from_this<\n         return recover_r(unique, _executor, std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto recover_r(bool, S s, F&& f) {\n+    template <typename E, typename F>\n+    auto recover_r(bool, E executor, F&& f) {\n         // rvalue case unique is assumed.\n         auto p = package<std::result_of_t<F(future<T>)>()>(\n-            s, [_f = std::forward<F>(f), _p = future<T>(this->shared_from_this())]() mutable {\n+            executor, [_f = std::forward<F>(f), _p = future<T>(this->shared_from_this())]() mutable {\n                 return _f(std::move(_p));\n             });\n \n         bool ready;\n         {\n             std::unique_lock<std::mutex> lock(_mutex);\n             ready = _ready;\n-            if (!ready) _then = {std::move(s), std::move(p.first)};\n+            if (!ready) _then = {std::move(executor), std::move(p.first)};\n         }\n-        if (ready) s(std::move(p.first));\n+        if (ready) executor(std::move(p.first));\n \n         return reduce(std::move(p.second));\n     }\n@@ -524,9 +524,9 @@ struct shared_base<void> : std::enable_shared_from_this<shared_base<void>> {\n         return then(_executor, std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto then(S&& s, F&& f) {\n-        return recover(std::forward<S>(s), [_f = std::forward<F>(f)](auto x) mutable {\n+    template <typename E, typename F>\n+    auto then(E&& executor, F&& f) {\n+        return recover(std::forward<E>(executor), [_f = std::forward<F>(f)](auto x) mutable {\n             x.get_try(); // throw if error\n             return std::move(_f)();\n         });\n@@ -537,27 +537,27 @@ struct shared_base<void> : std::enable_shared_from_this<shared_base<void>> {\n         return then(_executor, std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto then_r(bool, S&& s, F&& f) {\n-        return then(std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto then_r(bool, E&& executor, F&& f) {\n+        return then(std::forward<E>(executor), std::forward<F>(f));\n     }\n \n     template <typename F>\n     auto recover(F&& f) {\n         return recover(_executor, std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto recover(S s, F&& f) -> future<reduced_t<std::result_of_t<F(future<void>)>>>;\n+    template <typename E, typename F>\n+    auto recover(E&& executor, F&& f) -> future<reduced_t<std::result_of_t<F(future<void>)>>>;\n \n     template <typename F>\n     auto recover_r(bool, F&& f) {\n         return recover(_executor, std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto recover_r(bool, S&& s, F&& f) {\n-        return recover(std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto recover_r(bool, E&& executor, F&& f) {\n+        return recover(std::forward<E>(executor), std::forward<F>(f));\n     }\n \n     template <typename R>\n@@ -663,12 +663,12 @@ class packaged_task {\n \n     explicit packaged_task(ptr_t p) : _p(std::move(p)) {}\n \n-    template <typename Signature, typename S, typename F>\n-    friend auto package(S&&, F &&) -> std::pair<detail::packaged_task_from_signature_t<Signature>,\n+    template <typename Signature, typename E, typename F>\n+    friend auto package(E&&, F &&) -> std::pair<detail::packaged_task_from_signature_t<Signature>,\n                                                 future<detail::result_of_t_<Signature>>>;\n \n-    template <typename Signature, typename S, typename F>\n-    friend auto package_with_broken_promise(S&&, F &&)\n+    template <typename Signature, typename E, typename F>\n+    friend auto package_with_broken_promise(E&&, F&&)\n         -> std::pair<detail::packaged_task_from_signature_t<Signature>,\n                      future<detail::result_of_t_<Signature>>>;\n \n@@ -714,12 +714,12 @@ class future<T, enable_if_copyable<T>> {\n \n     explicit future(ptr_t p) : _p(std::move(p)) {}\n \n-    template <typename Signature, typename S, typename F>\n-    friend auto package(S&&, F &&) -> std::pair<detail::packaged_task_from_signature_t<Signature>,\n+    template <typename Signature, typename E, typename F>\n+    friend auto package(E&&, F&&) -> std::pair<detail::packaged_task_from_signature_t<Signature>,\n                                                 future<detail::result_of_t_<Signature>>>;\n \n-    template <typename Signature, typename S, typename F>\n-    friend auto package_with_broken_promise(S&&, F &&)\n+    template <typename Signature, typename E, typename F>\n+    friend auto package_with_broken_promise(E&&, F &&)\n         -> std::pair<detail::packaged_task_from_signature_t<Signature>,\n                      future<detail::result_of_t_<Signature>>>;\n \n@@ -746,39 +746,39 @@ class future<T, enable_if_copyable<T>> {\n         return _p->then(std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto then(S&& s, F&& f) const& {\n-        return _p->then(std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto then(E&& executor, F&& f) const& {\n+        return _p->then(std::forward<E>(executor), std::forward<F>(f));\n     }\n \n     template <typename F>\n     auto then(F&& f) && {\n         return _p->then_r(unique_usage(_p), std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto then(S&& s, F&& f) && {\n-        return _p->then_r(unique_usage(_p), std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto then(E&& executor, F&& f) && {\n+        return _p->then_r(unique_usage(_p), std::forward<E>(executor), std::forward<F>(f));\n     }\n \n     template <typename F>\n     auto recover(F&& f) const& {\n         return _p->recover(std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto recover(S&& s, F&& f) const& {\n-        return _p->recover(std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto recover(E&& executor, F&& f) const& {\n+        return _p->recover(std::forward<E>(executor), std::forward<F>(f));\n     }\n \n     template <typename F>\n     auto recover(F&& f) && {\n         return _p->recover_r(unique_usage(_p), std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto recover(S&& s, F&& f) && {\n-        return _p->recover_r(unique_usage(_p), std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto recover(E&& executor, F&& f) && {\n+        return _p->recover_r(unique_usage(_p), std::forward<E>(executor), std::forward<F>(f));\n     }\n \n     void detach() const {\n@@ -805,12 +805,12 @@ class future<void, void> {\n \n     explicit future(ptr_t p) : _p(std::move(p)) {}\n \n-    template <typename Signature, typename S, typename F>\n-    friend auto package(S&&, F &&) -> std::pair<detail::packaged_task_from_signature_t<Signature>,\n+    template <typename Signature, typename E, typename F>\n+    friend auto package(E&&, F &&) -> std::pair<detail::packaged_task_from_signature_t<Signature>,\n                                                 future<detail::result_of_t_<Signature>>>;\n \n-    template <typename Signature, typename S, typename F>\n-    friend auto package_with_broken_promise(S&&, F &&)\n+    template <typename Signature, typename E, typename F>\n+    friend auto package_with_broken_promise(E&&, F &&)\n         -> std::pair<detail::packaged_task_from_signature_t<Signature>,\n                      future<detail::result_of_t_<Signature>>>;\n \n@@ -837,39 +837,39 @@ class future<void, void> {\n         return _p->then(std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto then(S&& s, F&& f) const& {\n-        return _p->then(std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto then(E&& executor, F&& f) const& {\n+        return _p->then(std::forward<E>(executor), std::forward<F>(f));\n     }\n \n     template <typename F>\n     auto then(F&& f) && {\n         return _p->then_r(unique_usage(_p), std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto then(S&& s, F&& f) && {\n-        return _p->then_r(unique_usage(_p), std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto then(E&& executor, F&& f) && {\n+        return _p->then_r(unique_usage(_p), std::forward<E>(executor), std::forward<F>(f));\n     }\n \n     template <typename F>\n     auto recover(F&& f) const& {\n         return _p->recover(std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto recover(S&& s, F&& f) const& {\n-        return _p->recover(std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto recover(E&& executor, F&& f) const& {\n+        return _p->recover(std::forward<E>(executor), std::forward<F>(f));\n     }\n \n     template <typename F>\n     auto recover(F&& f) && {\n         return _p->recover_r(unique_usage(_p), std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto recover(S&& s, F&& f) && {\n-        return _p->recover_r(unique_usage(_p), std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto recover(E&& executor, F&& f) && {\n+        return _p->recover_r(unique_usage(_p), std::forward<E>(executor), std::forward<F>(f));\n     }\n \n     void detach() const {\n@@ -895,12 +895,12 @@ class future<T, enable_if_not_copyable<T>> {\n     explicit future(ptr_t p) : _p(std::move(p)) {}\n     future(const future&) = default;\n \n-    template <typename Signature, typename S, typename F>\n-    friend auto package(S&&, F &&) -> std::pair<detail::packaged_task_from_signature_t<Signature>,\n-                                                future<detail::result_of_t_<Signature>>>;\n+    template <typename Signature, typename E, typename F>\n+    friend auto package(E&&, F &&) -> std::pair<detail::packaged_task_from_signature_t<Signature>,\n+                                           future<detail::result_of_t_<Signature>>>;\n \n-    template <typename Signature, typename S, typename F>\n-    friend auto package_with_broken_promise(S&&, F &&)\n+    template <typename Signature, typename E, typename F>\n+    friend auto package_with_broken_promise(E&&, F &&)\n         -> std::pair<detail::packaged_task_from_signature_t<Signature>,\n                      future<detail::result_of_t_<Signature>>>;\n \n@@ -930,19 +930,19 @@ class future<T, enable_if_not_copyable<T>> {\n         return _p->then_r(unique_usage(_p), std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto then(S&& s, F&& f) && {\n-        return _p->then_r(unique_usage(_p), std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto then(E&& executor, F&& f) && {\n+        return _p->then_r(unique_usage(_p), std::forward<E>(executor), std::forward<F>(f));\n     }\n \n     template <typename F>\n     auto recover(F&& f) && {\n         return _p->recover_r(unique_usage(_p), std::forward<F>(f));\n     }\n \n-    template <typename S, typename F>\n-    auto recover(S&& s, F&& f) && {\n-        return _p->recover_r(unique_usage(_p), std::forward<S>(s), std::forward<F>(f));\n+    template <typename E, typename F>\n+    auto recover(E&& executor, F&& f) && {\n+        return _p->recover_r(unique_usage(_p), std::forward<E>(executor), std::forward<F>(f));\n     }\n \n     void detach() const {\n@@ -960,18 +960,18 @@ class future<T, enable_if_not_copyable<T>> {\n     stlab::optional<std::exception_ptr> error() const& { return _p->_error; }\n };\n \n-template <typename Sig, typename S, typename F>\n-auto package(S&& s, F&& f)\n+template <typename Sig, typename E, typename F>\n+auto package(E&& executor, F&& f)\n     -> std::pair<detail::packaged_task_from_signature_t<Sig>, future<detail::result_of_t_<Sig>>> {\n-    auto p = std::make_shared<detail::shared<Sig>>(std::forward<S>(s), std::forward<F>(f));\n+    auto p = std::make_shared<detail::shared<Sig>>(std::forward<E>(executor), std::forward<F>(f));\n     return std::make_pair(detail::packaged_task_from_signature_t<Sig>(p),\n                           future<detail::result_of_t_<Sig>>(p));\n }\n \n-template <typename Sig, typename S, typename F>\n-auto package_with_broken_promise(S&& s, F&& f)\n+template <typename Sig, typename E, typename F>\n+auto package_with_broken_promise(E&& executor, F&& f)\n     -> std::pair<detail::packaged_task_from_signature_t<Sig>, future<detail::result_of_t_<Sig>>> {\n-    auto p = std::make_shared<detail::shared<Sig>>(std::forward<S>(s), std::forward<F>(f));\n+    auto p = std::make_shared<detail::shared<Sig>>(std::forward<E>(executor), std::forward<F>(f));\n     auto result = std::make_pair(detail::packaged_task_from_signature_t<Sig>(p),\n                                  future<detail::result_of_t_<Sig>>(p));\n     result.second._p->_error =\n@@ -1124,9 +1124,9 @@ auto apply_when_any_arg(F& f, P& p) {\n     return p->apply(f);\n }\n \n-template <std::size_t i, typename P, typename T>\n-void attach_when_arg_(const std::shared_ptr<P>& p, T a) {\n-    p->_holds[i] = std::move(a).recover([_w = std::weak_ptr<P>(p)](auto x) {\n+template <std::size_t i, typename E, typename P, typename T>\n+void attach_when_arg_(E&& executor, const std::shared_ptr<P>& p, T a) {\n+    p->_holds[i] = 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@@ -1139,14 +1139,14 @@ void attach_when_arg_(const std::shared_ptr<P>& p, T a) {\n     });\n }\n \n-template <typename P, typename... Ts, std::size_t... I>\n-void attach_when_args_(std::index_sequence<I...>, const std::shared_ptr<P>& p, Ts... a) {\n-    (void)std::initializer_list<int>{(attach_when_arg_<I>(p, a), 0)...};\n+template <typename E, typename P, typename... Ts, std::size_t... I>\n+void attach_when_args_(std::index_sequence<I...>, E&& executor, const std::shared_ptr<P>& p, Ts... a) {\n+    (void)std::initializer_list<int>{(attach_when_arg_<I>(std::forward<E>(executor), p, a), 0)...};\n }\n \n-template <typename P, typename... Ts>\n-void attach_when_args(const std::shared_ptr<P>& p, Ts... a) {\n-    attach_when_args_(std::make_index_sequence<sizeof...(Ts)>(), p, std::move(a)...);\n+template <typename E, typename P, typename... Ts>\n+void attach_when_args(E&& executor, const std::shared_ptr<P>& p, Ts... a) {\n+    attach_when_args_(std::make_index_sequence<sizeof...(Ts)>(), std::forward<E>(executor), p, std::move(a)...);\n }\n \n } // namespace detail\n@@ -1165,9 +1165,7 @@ auto when_all(E executor, F f, future<Ts>... args) {\n     });\n     shared->_f = std::move(p.first);\n \n-    detail::attach_when_args(shared, std::move(args)...);\n-\n-    executor(std::move(p.first));\n+    detail::attach_when_args(std::move(executor), shared, std::move(args)...);\n \n     return std::move(p.second);\n }\n@@ -1186,9 +1184,7 @@ struct make_when_any {\n         });\n         shared->_f = std::move(p.first);\n \n-        detail::attach_when_args(shared, std::move(arg), std::move(args)...);\n-\n-        executor(std::move(p.first));\n+        detail::attach_when_args(std::move(executor), shared, std::move(arg), std::move(args)...);\n \n         return std::move(p.second);\n     }\n@@ -1208,9 +1204,7 @@ struct make_when_any<void> {\n         });\n         shared->_f = std::move(p.first);\n \n-        detail::attach_when_args(shared, std::move(args)...);\n-\n-        executor(std::move(p.first));\n+        detail::attach_when_args(std::move(executor), shared, std::move(args)...);\n \n         return std::move(p.second);\n     }\n@@ -1397,10 +1391,10 @@ struct common_context : CR {\n \n /**************************************************************************************************/\n \n-template <typename C, typename T>\n-void attach_tasks(size_t index, const std::shared_ptr<C>& context, T&& a) {\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     context->_holds[index] =\n-        std::move(a).recover([_context = std::weak_ptr<C>(context), _i = index](auto x) {\n+        std::move(a).recover(std::forward<E>(executor), [_context = std::weak_ptr<C>(context), _i = index](auto x) {\n             auto p = _context.lock();\n             if (!p) return;\n             auto error = x.error();\n@@ -1429,11 +1423,9 @@ struct create_range_of_futures<R, T, C, enable_if_copyable<T>> {\n \n         size_t index(0);\n         for (; first != last; ++first) {\n-            attach_tasks(index++, context, *first);\n+            attach_tasks(index++, executor, context, *first);\n         }\n \n-        executor(std::move(p.first));\n-\n         return std::move(p.second);\n     }\n };\n@@ -1452,11 +1444,9 @@ struct create_range_of_futures<R, T, C, enable_if_not_copyable<T>> {\n \n         size_t index(0);\n         for (; first != last; ++first) {\n-            attach_tasks(index++, context, std::forward<decltype(*first)>(*first));\n+            attach_tasks(index++, executor, context, std::forward<decltype(*first)>(*first));\n         }\n \n-        executor(std::move(p.first));\n-\n         return std::move(p.second);\n     }\n };\n@@ -1677,21 +1667,21 @@ void shared_base<void>::set_value(F& f, Args&&... args) {\n \n /**************************************************************************************************/\n \n-template <typename S, typename F>\n-auto shared_base<void>::recover(S s, F&& f)\n+template <typename E, typename F>\n+auto shared_base<void>::recover(E&& executor, F&& f)\n     -> future<reduced_t<std::result_of_t<F(future<void>)>>> {\n     auto p = package<std::result_of_t<F(future<void>)>()>(\n-        s, [_f = std::forward<F>(f), _p = future<void>(this->shared_from_this())]() mutable {\n+        executor, [_f = std::forward<F>(f), _p = future<void>(this->shared_from_this())]() mutable {\n             return _f(_p);\n         });\n \n     bool ready;\n     {\n         std::unique_lock<std::mutex> lock(_mutex);\n         ready = _ready;\n-        if (!ready) _then.emplace_back(std::move(s), std::move(p.first));\n+        if (!ready) _then.emplace_back(std::forward<E>(executor), std::move(p.first));\n     }\n-    if (ready) s(std::move(p.first));\n+    if (ready) executor(std::move(p.first));\n \n     return reduce(std::move(p.second));\n }"},{"sha":"18f7c3a6744efa6bde6e433a25361957c9541efa","filename":"stlab/copy_on_write.hpp","status":"modified","additions":2,"deletions":2,"changes":4,"blob_url":"https://github.com/stlab/stlab/blob/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/stlab%2Fcopy_on_write.hpp","raw_url":"https://github.com/stlab/stlab/raw/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/stlab%2Fcopy_on_write.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fcopy_on_write.hpp?ref=3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e","patch":"@@ -134,7 +134,7 @@ class copy_on_write {\n     }\n \n     friend inline bool operator<(const copy_on_write& x, const copy_on_write& y) noexcept {\n-        return *x < *y;\n+        return !x.identity(y) && (*x < *y);\n     }\n \n     friend inline bool operator<(const copy_on_write& x, const element_type& y) noexcept {\n@@ -182,7 +182,7 @@ class copy_on_write {\n     }\n \n     friend inline bool operator==(const copy_on_write& x, const copy_on_write& y) noexcept {\n-        return *x == *y;\n+        return x.identity(y) || (*x == *y);\n     }\n \n     friend inline bool operator==(const copy_on_write& x, const element_type& y) noexcept {"},{"sha":"568ba7234eecf1713c4f7e894b60ab4abe71c0fe","filename":"stlab/version.hpp","status":"modified","additions":2,"deletions":2,"changes":4,"blob_url":"https://github.com/stlab/stlab/blob/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/stlab%2Fversion.hpp","raw_url":"https://github.com/stlab/stlab/raw/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/stlab%2Fversion.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fversion.hpp?ref=3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e","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 100301\n+#define STLAB_VERSION 100302\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_3_1\"\n+#define STLAB_LIB_VERSION \"1_3_2\"\n \n #endif"},{"sha":"b03571e71f77e7215d3803282a4ba58b68a79394","filename":"test/future_test_helper.hpp","status":"modified","additions":2,"deletions":3,"changes":5,"blob_url":"https://github.com/stlab/stlab/blob/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/test%2Ffuture_test_helper.hpp","raw_url":"https://github.com/stlab/stlab/raw/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/test%2Ffuture_test_helper.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ffuture_test_helper.hpp?ref=3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e","patch":"@@ -25,8 +25,7 @@ template <std::size_t no>\n struct custom_scheduler {\n     using result_type = void;\n \n-    template <typename F>\n-    void operator()(F f) {\n+    void operator()(stlab::task<void()> f) const {\n         ++counter();\n         // The implementation on Windows or the mac uses a scheduler that allows many tasks in the\n         // pool in parallel\n@@ -49,7 +48,7 @@ struct custom_scheduler {\n     }\n \n private:\n-    const size_t _id = no; // only used for debugging purpose\n+    size_t _id = no; // only used for debugging purpose\n };\n \n class test_exception : public std::exception {"},{"sha":"4747f85afd0eef375d18b548975b2235224e1403","filename":"test/future_when_all_arguments_tests.cpp","status":"modified","additions":40,"deletions":0,"changes":40,"blob_url":"https://github.com/stlab/stlab/blob/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/test%2Ffuture_when_all_arguments_tests.cpp","raw_url":"https://github.com/stlab/stlab/raw/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/test%2Ffuture_when_all_arguments_tests.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ffuture_when_all_arguments_tests.cpp?ref=3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e","patch":"@@ -54,6 +54,46 @@ BOOST_AUTO_TEST_CASE(future_when_all_args_int_with_many_elements) {\n     BOOST_REQUIRE_LE(4, custom_scheduler<0>::usage_counter());\n     BOOST_REQUIRE_LE(1, custom_scheduler<1>::usage_counter());\n }\n+\n+BOOST_AUTO_TEST_CASE(future_when_all_args_int_with_ready_element) {\n+    BOOST_TEST_MESSAGE(\"running future when_all int with ready element\");\n+\n+    sut = when_all(custom_scheduler<1>(), [](auto x) { return x + x; }, make_ready_future<int>(42, immediate_executor));\n+\n+    check_valid_future(sut);\n+    wait_until_future_completed(sut);\n+\n+    BOOST_REQUIRE_EQUAL(42 + 42, *sut.get_try());\n+    BOOST_REQUIRE_LE(1, custom_scheduler<1>::usage_counter());\n+}\n+\n+BOOST_AUTO_TEST_CASE(future_when_all_args_int_with_two_ready_element) {\n+    BOOST_TEST_MESSAGE(\"running future when_all int with two ready element\");\n+\n+    sut = when_all(custom_scheduler<1>(), [](auto x, auto y) { return x + y; },\n+                   make_ready_future<int>(42, immediate_executor),\n+                   make_ready_future<int>(42, immediate_executor));\n+\n+    check_valid_future(sut);\n+    wait_until_future_completed(sut);\n+\n+    BOOST_REQUIRE_EQUAL(42 + 42, *sut.get_try());\n+    BOOST_REQUIRE_LE(1, custom_scheduler<1>::usage_counter());\n+}\n+\n+BOOST_AUTO_TEST_CASE(future_when_all_args) {\n+\n+    auto main_thread_id = std::this_thread::get_id();\n+    auto sut = when_all(custom_scheduler<1>(), [] { \n+        return std::this_thread::get_id(); \n+    }, make_ready_future(stlab::immediate_executor));\n+\n+    wait_until_future_completed(sut);\n+\n+    BOOST_REQUIRE(main_thread_id != *sut.get_try());\n+    BOOST_REQUIRE_LE(1, custom_scheduler<1>::usage_counter());\n+}\n+\n BOOST_AUTO_TEST_SUITE_END()\n \n BOOST_FIXTURE_TEST_SUITE(future_when_all_args_string, test_fixture<std::string>)"},{"sha":"2682c7b9ed814a9701c27e1bb473ac822635811c","filename":"test/future_when_any_range_tests.cpp","status":"modified","additions":1,"deletions":1,"changes":2,"blob_url":"https://github.com/stlab/stlab/blob/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/test%2Ffuture_when_any_range_tests.cpp","raw_url":"https://github.com/stlab/stlab/raw/3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e/test%2Ffuture_when_any_range_tests.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Ffuture_when_any_range_tests.cpp?ref=3cb8d9b218581d2b2f04fe68ffa99c8b9608f55e","patch":"@@ -605,7 +605,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_move_only_range_with_diamond_formation_elem\n     sut = when_any(custom_scheduler<1>(),\n       [&_i = index](stlab::move_only x, size_t index) {\n       _i = index;\n-      return std::move(x);\n+      return x;\n     },\n       std::make_pair(futures.begin(), futures.end()));\n "}]}