std::experimental::shared_future - cppreference.com (original) (raw)

std::experimental::shared_future

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:

There is no interoperation between std::experimental::shared_future and std::shared_future.

Contents

[edit] Member functions

| | constructs a shared_future (public member function) [edit] | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | checks if the shared state is ready (public member function) [edit] | | | attaches a continuation to a shared_future (public member function) [edit] | | | assigns the contents (public member function) |

Members identical to std::shared_future

Member functions

(destructor) destructs the future object (public member function of std::shared_future)
Getting the result
get returns the result (public member function of std::shared_future) [edit]
State
valid checks if the future has a shared state (public member function of std::shared_future) [edit]
wait waits for the result to become available (public member function of std::shared_future) [edit]
wait_for waits for the result, returns if it is not available for the specified timeout duration (public member function of std::shared_future) [edit]
wait_until 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]

[edit] Example

[edit] See also

| | a version of std::future enhanced with continuations and other features (class template) [edit] | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |