std::experimental::shared_future
From cppreference.com
< cpp | experimental
Defined in header
<experimental/shared_future>
|
||
template< class T > class shared_future;
|
(1) | (concurrency TS) |
template< class T > class shared_future<T&>;
|
(2) | (concurrency TS) |
template<> class shared_future<void>;
|
(3) | (concurrency TS) |
The class template std::experimental::shared_future
extends std::shared_future with the following operations:
- an unwrapping constructor from
future<shared_future<T>>
; - a member function
is_ready
to query whether the associated shared state is ready; and - a member function
then
to attach a continuation to the future.
Contents |
[edit] Member functions
unwrapping constructor from future<shared_future<T>> (public member function) |
|
checks if the shared state is ready (public member function) |
|
attaches a continuation to a shared_future (public member function) |
Member functions
constructs the future object (public member function of std::shared_future )
|
|
destructs the future object (public member function of std::shared_future )
|
|
assigns the contents (public member function of std::shared_future )
|
|
Getting the result |
|
returns the result (public member function of std::shared_future )
|
|
State |
|
checks if the future has a shared state (public member function of std::shared_future )
|
|
waits for the result to become available (public member function of std::shared_future )
|
|
waits for the result, returns if it is not available for the specified timeout duration (public member function of std::shared_future )
|
|
waits for the result, returns if it is not available until specified time point has been reached (public member function of std::shared_future )
|
[edit] Example
This section is incomplete Reason: no example |
[edit] See also
(concurrency TS)
|
A version of std::future enhanced with continuations and other features (class template) |