Navigation
API > API/Runtime > API/Runtime/Core
Awaitable Tasks are very simple they only allow for Lauching and Awaiting a Task. They will try to run other work while awaiting the Result.
| Name | TAwaitableTask |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Experimental/Async/AwaitableTask.h |
| Include Path | #include "Experimental/Async/AwaitableTask.h" |
Syntax
template<typename ReturnType>
class TAwaitableTask
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TAwaitableTask
(
const ThisClass& Other |
Experimental/Async/AwaitableTask.h | ||
| Experimental/Async/AwaitableTask.h | |||
TAwaitableTask
(
ThisClass&& Other |
Experimental/Async/AwaitableTask.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TAwaitableTask() |
Experimental/Async/AwaitableTask.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ThisClass | TAwaitableTask< ReturnType > | Experimental/Async/AwaitableTask.h | |
| TPromise | AwaitableTask_Detail::TPromise< R, C > | Experimental/Async/AwaitableTask.h | |
| TPromiseVTable | AwaitableTask_Detail::TPromiseVTable< P > | Experimental/Async/AwaitableTask.h | |
| TPromiseVTableBase | AwaitableTask_Detail::TPromiseVTableBase< R > | Experimental/Async/AwaitableTask.h | |
| TPromiseVTableDummy | AwaitableTask_Detail::TPromiseVTableDummy< R > | Experimental/Async/AwaitableTask.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| PromiseVTable | TPromiseVTableBase< ReturnType > | The PromiseVTable has enough storage for both the promise and vtable | Experimental/Async/AwaitableTask.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ReturnType Await () |
Await the Task Completion and get the result, this will assert if this is a Dummy Handle. | Experimental/Async/AwaitableTask.h | |
void Init
(
const TCHAR* DebugName, |
Initialize a new Task now and Abandon previous work (if any) initialized Tasks can be awaited on, but they will run synchronous in this case | Experimental/Async/AwaitableTask.h | |
void Init
(
const TCHAR* DebugName, |
Initialize a new Task with given Priority now and Abandon previous work (if any) initialized Tasks can be awaited on, but they will run synchronous in this case | Experimental/Async/AwaitableTask.h | |
bool InitAndLaunch
(
const TCHAR* DebugName, |
Initialize and Launch a Task | Experimental/Async/AwaitableTask.h | |
bool InitAndLaunch
(
const TCHAR* DebugName, |
Initialize and Launch a Task with given Priority | Experimental/Async/AwaitableTask.h | |
bool IsCompleted() |
Returns true if the Tasks completed. | Experimental/Async/AwaitableTask.h | |
bool IsLaunched() |
Returns true if the Task has been Launched. | Experimental/Async/AwaitableTask.h | |
bool IsValid() |
Does the TaskHandle hold a valid or Dummy Task? | Experimental/Async/AwaitableTask.h | |
void Reset() |
Abandon the Task and freeing its memory if this is the last reference to it. | Experimental/Async/AwaitableTask.h | |
bool TryLaunch() |
Launches the Task for processing on a WorkerThread. The returntype will specify if the Task was Launched successfully (true) or if it might have been launched already (false) | Experimental/Async/AwaitableTask.h |