Navigation
API > API/Runtime > API/Runtime/Core
TFuture Abstract base template for futures and shared futures.
| Name | TFutureBase |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Async/Future.h |
| Include Path | #include "Async/Future.h" |
Syntax
template<typename ResultType>
class TFutureBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TFutureBase () |
Default constructor. | Async/Future.h | |
TFutureBase
(
TSharedPtr< StateType >&& InState |
Creates and initializes a new instance. | Async/Future.h | |
TFutureBase
(
const TSharedPtr< StateType >& InState |
Async/Future.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ConstResultType | typename StateType::ConstResultType | Async/Future.h | |
| MutableResultType | typename StateType::MutableResultType | Async/Future.h | |
| RvalueResultType | typename StateType::RvalueResultType | Async/Future.h | |
| StateType | TFutureState< ResultType > | Async/Future.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| State | TSharedPtr< StateType > | Holds the future's state. | Async/Future.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ConstResultType Get () |
Gets the future's result.Not equivalent to std::future::get(). The future remains valid. | Async/Future.h | |
ConstResultType Get () |
Async/Future.h | ||
bool IsReady () |
Checks whether this future object has its value set. | Async/Future.h | |
bool IsValid () |
Checks whether this future object has a valid state. | Async/Future.h | |
void Wait () |
Blocks the calling thread until the future result is available. | Async/Future.h | |
| Blocks the calling thread until the future result is available or the specified duration is exceeded. | Async/Future.h | ||
| Blocks the calling thread until the future result is available or the specified time is hit. | Async/Future.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const TSharedPtr< StateType > & GetState() |
Gets the shared state object. | Async/Future.h | |
auto Next
(
Func Continuation |
Next implementation. | Async/Future.h | |
void Reset () |
Reset the future. | Async/Future.h | |
auto Then
(
Func Continuation |
Then implementation. | Async/Future.h |