Navigation
API > API/Runtime > API/Runtime/Core
Base class for the internal state of asynchronous return values (futures).
| Name | FFutureState |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Async/Future.h |
| Include Path | #include "Async/Future.h" |
Syntax
class FFutureState
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FFutureState () |
Default constructor. | Async/Future.h | |
FFutureState
(
TUniqueFunction< void()>&& InCompletionCallback |
Create and initialize a new instance with a callback. | Async/Future.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bComplete | TAtomic< bool > | Whether the asynchronous result is available. | Async/Future.h | |
| CompletionCallback | TUniqueFunction< void()> | An optional callback function that is executed the state is completed. | Async/Future.h | |
| CompletionEvent | FPooledSyncEvent | Holds an event signaling that the result is available. | Async/Future.h | |
| Mutex | FCriticalSection | Mutex used to allow proper handling of continuations | Async/Future.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool IsComplete () |
Checks whether the asynchronous result has been set. | Async/Future.h | |
void SetContinuation
(
TUniqueFunction< void()>&& Continuation |
Set a continuation to be called on completion of the promise | Async/Future.h | |
| Blocks the calling thread until the future result is available. | Async/Future.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void MarkComplete() |
Notifies any waiting threads that the result is available. | Async/Future.h |