TAsyncGraphTask

Template for asynchronous functions that are executed in the Task Graph system.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FAsyncGraphTaskBase

TAsyncGraphTask

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Async/Async.h

Include

#include "Async/Async.h"

Syntax

template<typename ResultType>
class TAsyncGraphTask : public FAsyncGraphTaskBase

Remarks

Template for asynchronous functions that are executed in the Task Graph system.

Constructors

Name Description

Public function

TAsyncGraphTask

(
    TUniqueFunction< ResultType()>&& I...,
    TPromise< ResultType >&& InPromise,
    ENamedThreads::Type InDesiredThread
)

Creates and initializes a new instance.

Functions

Name Description

Public function

void

 

DoTask

(
    ENamedThreads::Type CurrentThread,
    const FGraphEventRef& MyCompletion...
)

Performs the actual task.

Public function

ENamedThread...

 

GetDesiredThread()

Returns the name of the thread that this task should run on.

Public function

TFuture< Res...

 

GetFuture()

Gets the future that will hold the asynchronous result.