std::shared_future::wait_for

template< class Rep, class Period > std::future_status wait_for( const std::chrono::duration<Rep,Period>& timeout_duration ) const; (since C++11) Waits for the result to become available. Blocks until specified timeout_duration has elapsed or the result becomes available, whichever comes first. Returns value identifies the state of the result. A steady clock is used to measure the duration. This function may block for longer than timeout_duration due to scheduling or res

std::shared_future

Defined in header <future> template< class T > class shared_future; (1) (since C++11) template< class T > class shared_future<T&>; (2) (since C++11) template<> class shared_future<void>; (3) (since C++11) The class template std::shared_future provides a mechanism to access the result of asynchronous operations, similar to std::future, except that multiple threads are allowed to wait for the same shared state. Unlike std

std::set_union

Defined in header <algorithm> template< class InputIt1, class InputIt2, class OutputIt > OutputIt set_union( InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt d_first ); (1) template< class InputIt1, class InputIt2, class OutputIt, class Compare > OutputIt set_union( InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt d_first,

std::shared_future::valid

bool valid() const; (since C++11) Checks if the future refers to a shared state. This is the case only for futures that were not default-constructed or moved from. Unlike std::future, std::shared_future's shared state is not invalidated when get() is called. The behavior is undefined if any member function other than the destructor, the move-assignment operator, or valid is called on a shared_future that does not refer to shared state (although implementations are encouraged to throw s

std::shared_future::get

const T& get() const; (1) (member only of generic shared_future template)(since C++11) T& get() const; (2) (member only of shared_future<T&> template specialization)(since C++11) void get() const; (3) (member only of shared_future<void> template specialization)(since C++11) The get method waits until the shared_future has a valid result and (depending on which template is used) retrieves it. It effectively calls wait() in order to wait for the result.

std::shared_future::shared_future

shared_future(); (1) (since C++11) shared_future( const shared_future& other ); (2) (since C++11) shared_future( std::future<T>&& other ); (3) (since C++11) shared_future( shared_future&& other ); (4) (since C++11) Constructs a new shared_future. 1) Default constructor. Constructs an empty shared future, that doesn't refer to a shared state, that is valid() == false. 2) Constructs a shared future that refers to the same shared state, as othe

std::set_symmetric_difference

Defined in header <algorithm> template< class InputIt1, class InputIt2, class OutputIt > OutputIt set_symmetric_difference( InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt d_first ); (1) template< class InputIt1, class InputIt2, class OutputIt, class Compare > OutputIt set_symmetric_difference( InputIt1 first1, InputIt1 last1,

std::set_new_handler

Defined in header <new> std::new_handler set_new_handler( std::new_handler new_p ); Makes new_p the new global new-handler function and returns the previously installed new-handler. The new-handler function is the function called by allocation functions whenever a memory allocation attempt fails. Its intended purpose is one of three things: 1) make more memory available 2) terminate the program (e.g. by calling std::terminate) 3) throw exception of type std::bad_alloc or

std::set_terminate

Defined in header <exception> std::terminate_handler set_terminate( std::terminate_handler f ); Makes f the new global terminate handler function and returns the previously installed std::terminate_handler. This function is thread-safe. Every call to std::set_terminate synchronizes-with (see std::memory_order) the subsequent std::set_terminate and std::get_terminate. (since C++11) Parameters f - pointer to function of type std::terminate_handler, or null pointer

std::set_unexpected

Defined in header <exception> std::unexpected_handler set_unexpected( std::unexpected_handler f ); (deprecated since C++11) Makes f the new global std::unexpected_handler and returns the previously installed std::unexpected_handler. This function is thread-safe. Every call to std::set_unexpected synchronizes-with (see std::memory_order) the subsequent calls to std::set_unexpected and std::get_unexpected. (since C++11) Parameters f - pointer to function of type s