hpx::wait_any_n

Contents

hpx::wait_any_n#

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_any_n(InputIter first, std::size_t count)#

The function wait_any_n is a non-deterministic choice operator. It OR-composes all future objects given and returns after one future of that list finishes execution.

Note

The function wait_any_n returns after at least one future has become ready. All input futures are still valid after wait_any_n returns.

Note

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

Parameters:
  • first – [in] The iterator pointing to the first element of a sequence of future or shared_future objects for which wait_any_n should wait.

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