hpx::wait_each
hpx::wait_each#
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 F, typename Future>
void wait_each(F &&f, std::vector<Future> &&futures)# The function wait_each is an 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
This function consumes the futures as they are passed on to the supplied function. The callback should take one or two parameters, namely either a future to be processed or a type that std::size_t is implicitly convertible to as the first parameter and the future as the second parameter. The first parameter will correspond to the index of the current future in the collection.
- Parameters
f – The function which will be called for each of the input futures once the future has become ready.
futures – A vector holding an arbitrary amount of future or shared_future objects for which wait_each should wait.
-
template<typename F, typename Iterator>
void wait_each(F &&f, Iterator begin, Iterator end)# The function wait_each is an 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
This function consumes the futures as they are passed on to the supplied function. The callback should take one or two parameters, namely either a future to be processed or a type that std::size_t is implicitly convertible to as the first parameter and the future as the second parameter. The first parameter will correspond to the index of the current future in the collection.
- Parameters
f – The function which will be called for each of the input futures once the future has become ready.
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.
-
template<typename F, typename ...T>
void wait_each(F &&f, T&&... futures)# The function wait_each is an 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
This function consumes the futures as they are passed on to the supplied function. The callback should take one or two parameters, namely either a future to be processed or a type that std::size_t is implicitly convertible to as the first parameter and the future as the second parameter. The first parameter will correspond to the index of the current future in the collection.
- Parameters
f – The function which will be called for each of the input futures once the future has become ready.
futures – An arbitrary number of future or shared_future objects, possibly holding different types for which wait_each should wait.
-
template<typename F, typename Iterator>
void wait_each_n(F &&f, Iterator begin, std::size_t count)# The function wait_each 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. Additionally, the supplied function is called for each of the passed futures as soon as the future has become ready.
Note
This function consumes the futures as they are passed on to the supplied function. The callback should take one or two parameters, namely either a future to be processed or a type that std::size_t is implicitly convertible to as the first parameter and the future as the second parameter. The first parameter will correspond to the index of the current future in the collection.
- Parameters
f – The function which will be called for each of the input futures once the future has become ready.
begin – The iterator pointing to the first element of a sequence of future or shared_future objects for which wait_each_n should wait.
count – The number of elements in the sequence starting at first.
-
template<typename F, typename Future>