Template for promises. 更多...
#include <Future.h>
继承自 TPromiseBase< InternalResultType > .
Public 成员函数 | |
| template<typename... ArgTypes> | |
| void | EmplaceValue (ArgTypes &&... Args) |
| Sets the promised result. 更多... | |
| TFuture< ResultType > | GetFuture () |
| Gets a TFuture object associated with the shared state of this promise. 更多... | |
| TPromise & | operator= (TPromise &&Other) |
| Move assignment operator. 更多... | |
| FORCEINLINE void | SetValue (const ResultType &Result) |
| Sets the promised result. 更多... | |
| FORCEINLINE void | SetValue (ResultType &&Result) |
| Sets the promised result (from rvalue). 更多... | |
| TPromise () | |
| Default constructor (creates a new shared state). | |
| TPromise (TPromise &&Other) | |
| Move constructor. 更多... | |
| TPromise (TUniqueFunction< void()> &&CompletionCallback) | |
| Create and initialize a new instance with a callback. 更多... | |
Template for promises.
|
inline |
Move constructor.
| Other | The promise holding the shared state to move. |
|
inline |
Create and initialize a new instance with a callback.
| CompletionCallback | A function that is called when the future state is completed. |
|
inline |
Sets the promised result.
The result must be set only once. An assertion will be triggered if this method is called a second time.
| Result | The result value to set. |
|
inline |
Move assignment operator.
| Other | The promise holding the shared state to move. |
|
inline |
Sets the promised result.
The result must be set only once. An assertion will be triggered if this method is called a second time.
| Result | The result value to set. |
|
inline |
Sets the promised result (from rvalue).
The result must be set only once. An assertion will be triggered if this method is called a second time.
| Result | The result value to set. |