hpx::wait_all#

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_all(InputIter first, InputIter last)#

The function wait_all is an operator allowing to join on the result of all given futures. It AND-composes all future objects given and returns after they finished executing.

Note

The function wait_all returns after all futures have become ready. All input futures are still valid after wait_all returns.

Note

The function wait_all will rethrow any exceptions captured by the futures while becoming ready. If this behavior is undesirable, use wait_all_nothrow instead.

Parameters
  • first – The iterator pointing to the first element of a sequence of future or shared_future objects for which wait_all should wait.

  • last – The iterator pointing to the last element of a sequence of future or shared_future objects for which wait_all should wait.

template<typename R>
void wait_all(std::vector<future<R>> &&futures)#

The function wait_all is an operator allowing to join on the result of all given futures. It AND-composes all future objects given and returns after they finished executing.

Note

The function wait_all returns after all futures have become ready. All input futures are still valid after wait_all returns.

Note

The function wait_all will rethrow any exceptions captured by the futures while becoming ready. If this behavior is undesirable, use wait_all_nothrow instead.

Parameters

futures – A vector or array holding an arbitrary amount of future or shared_future objects for which wait_all should wait.

template<typename R, std::size_t N>
void wait_all(std::array<future<R>, N> &&futures)#

The function wait_all is an operator allowing to join on the result of all given futures. It AND-composes all future objects given and returns after they finished executing.

Note

The function wait_all returns after all futures have become ready. All input futures are still valid after wait_all returns.

Note

The function wait_all will rethrow any exceptions captured by the futures while becoming ready. If this behavior is undesirable, use wait_all_nothrow instead.

Parameters

futures – A vector or array holding an arbitrary amount of future or shared_future objects for which wait_all should wait.

template<typename T>
void wait_all(hpx::future<T> const &f)#

The function wait_all is an operator allowing to join on the result of all given futures. It AND-composes all future objects given and returns after they finished executing.

Note

The function wait_all returns after the future has become ready. The input future is still valid after wait_all returns.

Note

The function wait_all will rethrow any exceptions captured by the future while becoming ready. If this behavior is undesirable, use wait_all_nothrow instead.

Parameters

f – A future or shared_future for which wait_all should wait.

template<typename ...T>
void wait_all(T&&... futures)#

The function wait_all is an operator allowing to join on the result of all given futures. It AND-composes all future objects given and returns after they finished executing.

Note

The function wait_all returns after all futures have become ready. All input futures are still valid after wait_all returns.

Note

The function wait_all will rethrow any exceptions captured by the futures while becoming ready. If this behavior is undesirable, use wait_all_nothrow instead.

Parameters

futures – An arbitrary number of future or shared_future objects, possibly holding different types for which wait_all should wait.

template<typename InputIter>
void wait_all_n(InputIter begin, std::size_t count)#

The function wait_all_n is an operator allowing to join on the result of all given futures. It AND-composes all future objects given and returns after they finished executing.

Note

The function wait_all_n returns after all futures have become ready. All input futures are still valid after wait_all_n returns.

Note

The function wait_all_n will rethrow any exceptions captured by the futures while becoming ready. If this behavior is undesirable, use wait_all_n_nothrow instead.

Parameters
  • begin – The iterator pointing to the first element of a sequence of future or shared_future objects for which wait_all_n should wait.

  • count – The number of elements in the sequence starting at first.

Returns

The function wait_all_n will return an iterator referring to the first element in the input sequence after the last processed element.