shared_future Class
Describes an asynchronous return object. In contrast with a future object, an asynchronous provider can be associated with any number of shared_future objects.
template<class Ty>
class shared_future;
Remarks
Do not call any methods other than valid, operator=, and the destructor on a shared_future object that's empty.
shared_future objects are not synchronized. Calling methods on the same object from multiple threads introduces a data race that has unpredictable results.
Members
Public Constructors
Name |
Description |
---|---|
Constructs a shared_future object. |
Public Methods
Name |
Description |
---|---|
Retrieves the result that's stored in the associated asynchronous state. |
|
Specifies whether the object is not empty. |
|
Blocks the current thread until the associated asynchronous state is ready. |
|
Blocks until the associated asynchronous state is ready or until the specified time has elapsed. |
|
Blocks until the associated asynchronous state is ready or until a specified point in time. |
Public Operators
Name |
Description |
---|---|
Assigns a new associated asynchronous state. |
Requirements
Header: future
Namespace: std