HPX - High Performance ParalleX

PrevUpHomeNext

Function template wait_each

hpx::wait_each

Synopsis

// In header: <hpx/lcos/wait_each.hpp>


template<typename F, typename Iterator> 
  void wait_each(F && f, Iterator begin, Iterator end);

Description

The function wait_each is a operator allowing to join on the results of all given futures. It AND-composes all future objects given and returns after they finished executing. Additionally, the supplied function is called for each of the passed futures as soon as the future has become ready. wait_each returns after all futures have been become ready.

[Note] Note

This function consumes the futures as they are passed on to the supplied function.

Parameters:

begin

The iterator pointing to the first element of a sequence of future or shared_future objects for which wait_each should wait.

end

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

f

The function which will be called for each of the input futures once the future has become ready.


PrevUpHomeNext