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

#include <Async.h>

+ Inheritance diagram for TAsyncQueuedWork< ResultType >:

Public Member Functions

 TAsyncQueuedWork (TUniqueFunction< ResultType()> &&InFunction, TPromise< ResultType > &&InPromise)
 
virtual void DoThreadedWork () override
 
virtual void Abandon () override
 
- Public Member Functions inherited from IQueuedWork
virtual EQueuedWorkFlags GetQueuedWorkFlags () const
 
virtual int64 GetRequiredMemory () const
 
virtual const TCHARGetDebugName () const
 
virtual ~IQueuedWork ()
 

Additional Inherited Members

- Public Types inherited from IQueuedWork
using IInternalDataType = TRefCountPtr< IQueuedWorkInternalData >
 
- Public Attributes inherited from IQueuedWork
IInternalDataType InternalData
 

Detailed Description

template<typename ResultType>
class TAsyncQueuedWork< ResultType >

Template for asynchronous functions that are executed in the queued thread pool.

Constructor & Destructor Documentation

◆ TAsyncQueuedWork()

template<typename ResultType >
TAsyncQueuedWork< ResultType >::TAsyncQueuedWork ( TUniqueFunction< ResultType()> &&  InFunction,
TPromise< ResultType > &&  InPromise 
)
inline

Creates and initializes a new instance.

Parameters
InFunctionThe function to execute asynchronously.
InPromiseThe promise object used to return the function's result.

Member Function Documentation

◆ Abandon()

template<typename ResultType >
virtual void TAsyncQueuedWork< ResultType >::Abandon ( )
inlineoverridevirtual

Tells the queued work that it is being abandoned so that it can do per object clean up as needed. This will only be called if it is being abandoned before completion. NOTE: This requires the object to delete itself using whatever heap it was allocated in.

Implements IQueuedWork.

◆ DoThreadedWork()

template<typename ResultType >
virtual void TAsyncQueuedWork< ResultType >::DoThreadedWork ( )
inlineoverridevirtual

This is where the real thread work is done. All work that is done for this queued object should be done from within the call to this function.

Implements IQueuedWork.


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