UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FAsyncTask< TTask > Class Template Reference

#include <AsyncWork.h>

+ Inheritance diagram for FAsyncTask< TTask >:

Public Member Functions

 FAsyncTask ()
 
template<typename Arg0Type , typename... ArgTypes>
 FAsyncTask (Arg0Type &&Arg0, ArgTypes &&... Args)
 
TTask & GetTask ()
 
const TTask & GetTask () const
 
bool TryAbandonTask () final
 
void DoTaskWork () final
 
- Public Member Functions inherited from FAsyncTaskBase
virtual ~FAsyncTaskBase ()
 
int64 GetRequiredMemory () const final
 
const TCHARGetDebugName () const final
 
void StartSynchronousTask (EQueuedWorkPriority InQueuedWorkPriority=EQueuedWorkPriority::Normal, EQueuedWorkFlags InQueuedWorkFlags=EQueuedWorkFlags::None, int64 InRequiredMemory=-1, const TCHAR *InDebugName=nullptr)
 
void StartBackgroundTask (FQueuedThreadPool *InQueuedPool=GThreadPool, EQueuedWorkPriority InQueuedWorkPriority=EQueuedWorkPriority::Normal, EQueuedWorkFlags InQueuedWorkFlags=EQueuedWorkFlags::None, int64 InRequiredMemory=-1, const TCHAR *InDebugName=nullptr)
 
void EnsureCompletion (bool bDoWorkOnThisThreadIfNotStarted=true, bool bIsLatencySensitive=false)
 
bool Reschedule (FQueuedThreadPool *InQueuedPool=GThreadPool, EQueuedWorkPriority InQueuedWorkPriority=EQueuedWorkPriority::Normal)
 
bool Cancel ()
 
bool WaitCompletionWithTimeout (float TimeLimitSeconds)
 
bool IsDone ()
 
bool IsWorkDone () const
 
bool IsIdle () const
 
bool SetPriority (EQueuedWorkPriority QueuedWorkPriority)
 
EQueuedWorkPriority GetPriority () const
 

Additional Inherited Members

- Protected Member Functions inherited from FAsyncTaskBase
void Init (TStatId InStatId)
 
void CheckIdle () const
 

Constructor & Destructor Documentation

◆ FAsyncTask() [1/2]

template<typename TTask >
FAsyncTask< TTask >::FAsyncTask ( )
inline

◆ FAsyncTask() [2/2]

template<typename TTask >
template<typename Arg0Type , typename... ArgTypes>
FAsyncTask< TTask >::FAsyncTask ( Arg0Type &&  Arg0,
ArgTypes &&...  Args 
)
inline

Forwarding constructor.

Member Function Documentation

◆ DoTaskWork()

template<typename TTask >
void FAsyncTask< TTask >::DoTaskWork ( )
inlinefinalvirtual

Perform task's work

Implements FAsyncTaskBase.

◆ GetTask() [1/2]

template<typename TTask >
TTask & FAsyncTask< TTask >::GetTask ( )
inline

◆ GetTask() [2/2]

template<typename TTask >
const TTask & FAsyncTask< TTask >::GetTask ( ) const
inline

◆ TryAbandonTask()

template<typename TTask >
bool FAsyncTask< TTask >::TryAbandonTask ( )
inlinefinalvirtual

Abandon task if possible, returns true on success, false otherwise.

Implements FAsyncTaskBase.


The documentation for this class was generated from the following file: