when_any |
Defined in
<concurrency/future.hpp> |
Creates a future that continues on the first success of any futures passed
(1) | ||
(2) |
(1)
Parameters
Executor which is used to schedule the resulting task |
|||
Callable object that implements the continuing task |
|||
Describes the range of futures. If an empty range is provided then an stlab::future_exception with code stlab::future_errc::broken_promise is thrown. |
(2)
Parameters
Executor which is used to schedule the resulting task |
|||
Callable object that implements the continuing task |
|||
Creates a future that continues on the first success of any futures passed. The results of all passed futures must be convertible to the first parameter of the continuing function. The function must accept the a second parameter of std::size_t. It will receive the index of the future that succeeded first.