hpx::wait_all_for_nothrow#
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>
hpx::wait_all_for_nothrow_result hpx::wait_all_for_nothrow(hpx::chrono::steady_duration const &timeout, InputIter first, InputIter last)# The function wait_all_for_nothrow is an operator allowing to join on the result of all given futures, similar to wait_all_for. It differs from wait_all_for in that it will not rethrow any exceptions captured by the given futures while they became ready; instead it returns as soon as either all futures have become ready, or the given timeout has elapsed, whichever happens first.
Note
The function wait_all_for_nothrow returns after all futures have become ready, or after the given timeout has expired, whichever comes first. All input futures are still valid after wait_all_for_nothrow returns, independently of the returned status, and can be inspected (e.g. using is_ready()) to determine which of the given futures have become ready.
Note
Unlike wait_all_for_nothrow, this function will not rethrow any exceptions captured by the futures while becoming ready. Any such exceptions are not rethrown by this call.
- Parameters:
timeout – The maximum duration to wait for all the given futures to become ready.
first – The iterator pointing to the first element of a sequence of future or shared_future objects for which wait_all_for_nothrow should wait.
last – The iterator pointing to the element after the last one of a sequence of future or shared_future objects for which wait_all_for_nothrow should wait.
- Returns:
Returns a wait_all_for_nothrow_result object whose status member is hpx::future_status::ready if all the given futures have become ready before timeout has elapsed, and hpx::future_status::timeout otherwise; and whose has_exceptional_results member indicates whether any of the futures that became ready had captured an exception.
-
template<typename R>
hpx::wait_all_for_nothrow_result hpx::wait_all_for_nothrow(hpx::chrono::steady_duration const &timeout, std::vector<future<R>> const &futures)# The function wait_all_for_nothrow is an operator allowing to join on the result of all given futures, similar to wait_all_for. It differs from wait_all_for in that it will not rethrow any exceptions captured by the given futures while they became ready; instead it returns as soon as either all futures have become ready, or the given timeout has elapsed, whichever happens first.
Note
The function wait_all_for_nothrow returns after all futures have become ready, or after the given timeout has expired, whichever comes first. All input futures are still valid after wait_all_for_nothrow returns, independently of the returned status, and can be inspected (e.g. using is_ready()) to determine which of the given futures have become ready.
Note
Unlike wait_all_for, this function will not rethrow any exceptions captured by the futures while becoming ready. Any such exceptions are not rethrown by this call.
Note
The function wait_all_for_nothrow returns after all futures have become ready, or after the given timeout has expired, whichever comes first. All input futures are still valid after wait_all_for returns, independently of the returned status, and can be inspected (e.g. using is_ready()) to determine which of the given futures have become ready.
Note
The caller is responsible for keeping the futures container itself (and, for the iterator-range overload, the underlying sequence) alive, unmoved, and unmodified until it is done inspecting the futures’ state. If the timeout expires before all futures become ready, wait_all_for may leave asynchronous continuations attached to the not-yet-ready futures; destroying, moving, or reallocating the container before those futures settle results in undefined behavior.
- Parameters:
timeout – The maximum duration to wait for all the given futures to become ready.
futures – A vector or array holding an arbitrary amount of future or shared_future objects for which wait_all_for_nothrow should wait.
- Returns:
Returns a wait_all_for_nothrow_result object whose status member is hpx::future_status::ready if all the given futures have become ready before timeout has elapsed, and hpx::future_status::timeout otherwise; and whose has_exceptional_results member indicates whether any of the futures that became ready had captured an exception.
-
template<typename R, std::size_t N>
hpx::wait_all_for_nothrow_result hpx::wait_all_for_nothrow(hpx::chrono::steady_duration const &timeout, std::array<future<R>, N> const &futures)# The function wait_all_for_nothrow is an operator allowing to join on the result of all given futures, similar to wait_all_for. It differs from wait_all_for in that it will not rethrow any exceptions captured by the given futures while they became ready; instead it returns as soon as either all futures have become ready, or the given timeout has elapsed, whichever happens first.
Note
The function wait_all_for_nothrow returns after all futures have become ready, or after the given timeout has expired, whichever comes first. All input futures are still valid after wait_all_for_nothrow returns, independently of the returned status, and can be inspected (e.g. using is_ready()) to determine which of the given futures have become ready.
Note
Unlike wait_all_for, this function will not rethrow any exceptions captured by the futures while becoming ready. Any such exceptions are not rethrown by this call.
Note
The function wait_all_for_nothrow returns after all futures have become ready, or after the given timeout has expired, whichever comes first. All input futures are still valid after wait_all_for returns, independently of the returned status, and can be inspected (e.g. using is_ready()) to determine which of the given futures have become ready.
Note
The caller is responsible for keeping the futures container itself (and, for the iterator-range overload, the underlying sequence) alive, unmoved, and unmodified until it is done inspecting the futures’ state. If the timeout expires before all futures become ready, wait_all_for may leave asynchronous continuations attached to the not-yet-ready futures; destroying, moving, or reallocating the container before those futures settle results in undefined behavior.
- Parameters:
timeout – The maximum duration to wait for all the given futures to become ready.
futures – A vector or array holding an arbitrary amount of future or shared_future objects for which wait_all_for_nothrow should wait.
- Returns:
Returns a wait_all_for_nothrow_result object whose status member is hpx::future_status::ready if all the given futures have become ready before timeout has elapsed, and hpx::future_status::timeout otherwise; and whose has_exceptional_results member indicates whether any of the futures that became ready had captured an exception.
-
template<typename T>
hpx::wait_all_for_nothrow_result hpx::wait_all_for_nothrow(hpx::chrono::steady_duration const &timeout, hpx::future<T> const &f)# The function wait_all_for_nothrow is an operator allowing to join on the result of the given future, similar to wait_all_for. It differs from wait_all_for in that it will not rethrow any exceptions captured by the given future while it became ready; instead it returns as soon as either the future has become ready, or the given timeout has elapsed, whichever happens first.
Note
The function wait_all_for_nothrow returns after the future has become ready, or after the given timeout has expired, whichever comes first. The input future is still valid after wait_all_for_nothrow returns, independently of the returned status.
Note
Unlike wait_all_for, this function will not rethrow any exceptions captured by the future while becoming ready. Any such exception is silently discarded.
- Parameters:
timeout – The maximum duration to wait for the given future to become ready.
f – A future or shared_future for which wait_all_for_nothrow should wait.
- Returns:
Returns a wait_all_for_nothrow_result object whose status member is hpx::future_status::ready if all the given futures have become ready before timeout has elapsed, and hpx::future_status::timeout otherwise; and whose has_exceptional_results member indicates whether any of the futures that became ready had captured an exception.
-
template<typename ...T>
hpx::wait_all_for_nothrow_result hpx::wait_all_for_nothrow(hpx::chrono::steady_duration const &timeout, T const&... futures)# The function wait_all_for_nothrow is an operator allowing to join on the result of all given futures, similar to wait_all_for. It differs from wait_all_for in that it will not rethrow any exceptions captured by the given futures while they became ready; instead it returns as soon as either all futures have become ready, or the given timeout has elapsed, whichever happens first.
Note
The function wait_all_for_nothrow returns after all futures have become ready, or after the given timeout has expired, whichever comes first. All input futures are still valid after wait_all_for_nothrow returns, independently of the returned status, and can be inspected (e.g. using is_ready()) to determine which of the given futures have become ready.
Note
Unlike wait_all_for, this function will not rethrow any exceptions captured by the futures while becoming ready. Any such exceptions are not rethrown by this call.
- Parameters:
timeout – The maximum duration to wait for all the given futures to become ready.
futures – An arbitrary number of future or shared_future objects, possibly holding different types for which wait_all_for_nothrow should wait.
- Returns:
Returns a wait_all_for_nothrow_result object whose status member is hpx::future_status::ready if all the given futures have become ready before timeout has elapsed, and hpx::future_status::timeout otherwise; and whose has_exceptional_results member indicates whether any of the futures that became ready had captured an exception.