Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor of when_all() and when_all_ready().
- Now supports when_all()/when_all_ready() on a std::vector of arbitrary awaitables. - Changed when_all() to use an fmap() composition with result of when_all_ready() awaitable to extract the results from the when_all_task objects. This has the side-effect of meaning that 'co_await lvalueWhenAllAwaitable' now returns a prvalue result rather than an lvalue-reference to the result. However, the prvalue tuple/vector will contain a copy of the results if awaiting an lvalue (allowing you to await it again and get another copy) whereas if you co_await an rvalue awaitable then the results will be moved into the tuple/vector. - Re-added support for passing std::reference_wrapper-wrapped awaitables to when_all(). - Renamed when_all_awaitable_counter to when_all_counter. - Removed when_all_awaitable/when_all_awaitable2 as they are no longer needed. Everything is built on when_all_ready_awaitable.
- Loading branch information