// In header: <hpx/lcos/wait_each.hpp> template<typename F, typename Iterator> void wait_each_n(F && f, Iterator begin, std::size_t count);
The function wait_each is a operator allowing to join on the result 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.
This function consumes the futures as they are passed on to the supplied function.