|
CatapultServer
v0.5.0.1 (Elephant)
|
Stores the result of an asynchronous operation. More...


Public Member Functions | |
| promise () | |
| Constructs a promise. More... | |
| bool | valid () |
Returns true if this promise is valid. More... | |
| future< T > | get_future () |
| Returns a future associated with this promise. More... | |
| void | set_value (T &&value) |
| Sets the result of this promise to value. More... | |
| void | set_exception (std::exception_ptr pException) |
| Sets the result of this promise to pException. More... | |
Public Member Functions inherited from catapult::utils::MoveOnly | |
| constexpr | MoveOnly ()=default |
| Default constructor. More... | |
| ~MoveOnly ()=default | |
| Default destructor. More... | |
| MoveOnly (const NonCopyable &)=delete | |
| Disabled copy constructor. More... | |
| MoveOnly (MoveOnly &&)=default | |
| Default move constructor. More... | |
| MoveOnly & | operator= (const MoveOnly &)=delete |
| Disabled assignment operator. More... | |
| MoveOnly & | operator= (MoveOnly &&)=default |
| Default move assignment operator. More... | |
Private Attributes | |
| std::shared_ptr< detail::shared_state< T > > | m_pState |
| std::unique_ptr< std::atomic_flag > | m_pIsFutureCreated |
Stores the result of an asynchronous operation.
|
inline |
Constructs a promise.
|
inline |
Returns a future associated with this promise.
|
inline |
Sets the result of this promise to pException.

|
inline |
Sets the result of this promise to value.

|
inline |
Returns true if this promise is valid.
|
private |
|
private |