Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Async
Inheritance Hierarchy
- FNoncopyable
- TPromiseBase
- TPromise
- TCancellablePromise
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Async/Future.h |
| Include | #include "Async/Future.h" |
Syntax
template<typename ResultType>
class TPromise : public TPromiseBase< ResultType >
Remarks
Template for promises.
Constructors
| Type | Name | Description | |
|---|---|---|---|
TPromise () |
Default constructor (creates a new shared state). | ||
| Move constructor. | |||
TPromise
(
TUniqueFunction< void()>&& CompletionCallback |
Create and initialize a new instance with a callback. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | EmplaceValue
(
ArgTypes&&... Args |
Sets the promised result. | |
| TFuture< ResultType > | GetFuture () |
Gets a TFuture object associated with the shared state of this promise. | |
| void | SetValue
(
const ResultType& Result |
Sets the promised result. | |
| void | SetValue
(
ResultType&& Result |
Sets the promised result (from rvalue). |
Operators
Typedefs
| Name | Description |
|---|---|
| BaseType |