hpx::wait_some#
Defined in header hpx/future.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
See also:
-
template<typename InputIter>
void hpx::wait_some(std::size_t n, InputIter first, InputIter last)# The function wait_some is an operator allowing to join on the result of all given futures. It AND-composes all future objects given and returns a new future object representing the same list of futures after n of them finished executing.
Note
The function wait_some returns after n futures have become ready. All input futures are still valid after wait_some returns.
Note
The function wait_some will rethrow any exceptions captured by the futures while becoming ready. If this behavior is undesirable, use wait_some_nothrow instead.
- Parameters:
n – [in] The number of futures out of the arguments which have to become ready in order for the function to return.
first – [in] The iterator pointing to the first element of a sequence of future or shared_future objects for which when_all should wait.
last – [in] The iterator pointing to the last element of a sequence of future or shared_future objects for which when_all should wait.
-
template<typename R>
void hpx::wait_some(std::size_t n, std::vector<future<R>> &&futures)# The function wait_some is an operator allowing to join on the result of all given futures. It AND-composes all future objects given and returns a new future object representing the same list of futures after n of them finished executing.
Note
The function wait_some returns after n futures have become ready. All input futures are still valid after wait_some returns.
Note
The function wait_some will rethrow any exceptions captured by the futures while becoming ready. If this behavior is undesirable, use wait_some_nothrow instead.
- Parameters:
n – [in] The number of futures out of the arguments which have to become ready in order for the returned future to get ready.
futures – [in] A vector holding an arbitrary amount of future or shared_future objects for which wait_some should wait.
-
template<typename R, std::size_t N>
void hpx::wait_some(std::size_t n, std::array<future<R>, N> &&futures)# The function wait_some is an operator allowing to join on the result of all given futures. It AND-composes all future objects given and returns a new future object representing the same list of futures after n of them finished executing.
Note
The function wait_some returns after n futures have become ready. All input futures are still valid after wait_some returns.
Note
The function wait_some will rethrow any exceptions captured by the futures while becoming ready. If this behavior is undesirable, use wait_some_nothrow instead.
- Parameters:
n – [in] The number of futures out of the arguments which have to become ready in order for the returned future to get ready.
futures – [in] An array holding an arbitrary amount of future or shared_future objects for which wait_some should wait.
-
template<typename ...T>
void hpx::wait_some(std::size_t n, T&&... futures)# The function wait_some is an operator allowing to join on the result of all given futures. It AND-composes all future objects given and returns a new future object representing the same list of futures after n of them finished executing.
Note
The function wait_all returns after n futures have become ready. All input futures are still valid after wait_some returns.
Note
The function wait_some will rethrow any exceptions captured by the futures while becoming ready. If this behavior is undesirable, use wait_some_nothrow instead.
- Parameters:
n – [in] The number of futures out of the arguments which have to become ready in order for the returned future to get ready.
futures – [in] An arbitrary number of future or shared_future objects, possibly holding different types for which wait_some should wait.