hpx::wait_some
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.
-
namespace hpx
Top level HPX namespace.
Functions
-
template<typename InputIter>
void 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 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 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 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.
ec – [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.
-
template<typename InputIter>
void wait_some_n(std::size_t n, InputIter first, std::size_t count)# The function wait_some_n 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_n returns after n futures have become ready. All input futures are still valid after wait_some_n returns.
Note
The function wait_some_n will rethrow any exceptions captured by the futures while becoming ready. If this behavior is undesirable, use wait_some_n_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.
first – [in] The iterator pointing to the first element of a sequence of future or shared_future objects for which when_all should wait.
count – [in] The number of elements in the sequence starting at first.
-
template<typename InputIter>