Navigation
API > API/Runtime > API/Runtime/Core
Template for asynchronous functions that are executed in the Task Graph system.
| Name | TAsyncGraphTask |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Async/Async.h |
| Include Path | #include "Async/Async.h" |
Syntax
template<typename ResultType>
class TAsyncGraphTask : public FAsyncGraphTaskBase
Inheritance Hierarchy
- FAsyncGraphTaskBase → TAsyncGraphTask
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TAsyncGraphTask
(
TUniqueFunction< ResultType()>&& InFunction, |
Creates and initializes a new instance. | Async/Async.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DesiredThread | ENamedThreads::Type | The desired execution thread. | Async/Async.h | |
| Function | TUniqueFunction< ResultType()> | The function to execute on the Task Graph. | Async/Async.h | |
| Promise | TPromise< ResultType > | The promise to assign the result to. | Async/Async.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DoTask
(
ENamedThreads::Type CurrentThread, |
Performs the actual task. | Async/Async.h | |
ENamedThreads::Type GetDesiredThread() |
Returns the name of the thread that this task should run on. | Async/Async.h | |
TFuture< ResultType > GetFuture() |
Gets the future that will hold the asynchronous result. | Async/Async.h |