UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FImageWriteQueue Class Reference
+ Inheritance diagram for FImageWriteQueue:

Public Member Functions

 FImageWriteQueue ()
 
 ~FImageWriteQueue ()
 
virtual TFuture< boolEnqueue (TUniquePtr< IImageWriteTaskBase > &&InTask, bool bBlockIfAtCapacity=true) override
 
virtual TFuture< voidCreateFence (const TFunction< void()> &InOnFenceReached=TFunction< void()>()) override
 
virtual int32 GetNumPendingTasks () const override
 
void OnTaskCompleted (uint32 FenceID)
 
void BeginShutdown ()
 
- Public Member Functions inherited from IImageWriteQueue
virtual ~IImageWriteQueue ()
 

Detailed Description

Private implementation of the write queue

Constructor & Destructor Documentation

◆ FImageWriteQueue()

FImageWriteQueue::FImageWriteQueue ( )

◆ ~FImageWriteQueue()

FImageWriteQueue::~FImageWriteQueue ( )

Member Function Documentation

◆ BeginShutdown()

void FImageWriteQueue::BeginShutdown ( )

(thread-safe) Called from the module when this queue should start shutting down. Prevents any susequent tasks from being enqueued

◆ CreateFence()

TFuture< void > FImageWriteQueue::CreateFence ( const TFunction< void()> &  InOnFenceReached = TFunctionvoid()>())
overridevirtual

(thread-safe) Create a fence at the current position in the queue. The future and callback will be invoked when all existing tasks in the queue have been completed.

Note
: Where the queue is empty, the future will be immediately fulfilled, and callback invoked on the next main thread tick.
Parameters
InOnFenceReachedA callback to be invoked when the fence has been reached (ie all work ahead of it in the queue has been completed)
Returns
A future that is fulfilled when the current state of the queue has been completely finished

Implements IImageWriteQueue.

◆ Enqueue()

TFuture< bool > FImageWriteQueue::Enqueue ( TUniquePtr< IImageWriteTaskBase > &&  InTask,
bool  bInBlockIfAtCapacity = true 
)
overridevirtual

(thread-safe) Enqueue a new asynchronous image write task.

Parameters
InTaskA unique pointer to a task to perform on a thread when available. Pass with MoveTemp().
bInBlockIfAtCapacityWait until the number of pending tasks does not exceed the queue capacity. If false and the number of pending tasks does exceed, the function will return and will not enqueue the task.
Returns
A future to the completion state of the task (success or failure), or an invalid future in the case where the task could not be dispatched

Implements IImageWriteQueue.

◆ GetNumPendingTasks()

int32 FImageWriteQueue::GetNumPendingTasks ( ) const
overridevirtual

(thread-safe) Query the number of tasks currently pending or in progress

Implements IImageWriteQueue.

◆ OnTaskCompleted()

void FImageWriteQueue::OnTaskCompleted ( uint32  FenceID)

(thread-safe) Called from a task when it has been completed.

Parameters
FenceIDThe fence ID that the task was created under

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