UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IImageWriteQueue Class Referenceabstract

#include <ImageWriteQueue.h>

+ Inheritance diagram for IImageWriteQueue:

Public Member Functions

virtual ~IImageWriteQueue ()
 
virtual TFuture< boolEnqueue (TUniquePtr< IImageWriteTaskBase > &&InTask, bool bInBlockIfAtCapacity=true)=0
 
virtual TFuture< voidCreateFence (const TFunction< void()> &InOnFenceReached=TFunction< void()>())=0
 
virtual int32 GetNumPendingTasks () const =0
 

Detailed Description

Public interface for an asynchronous queue of work dedicated to writing images to disk

Concurrency metrics are controllable by ImageWriteQueue.MaxConcurrency and ImageWriteQueue.MaxQueueSize Dispatched tasks can contain callbacks that are called on the main thread when completed. It is possible to wait on completion of the current queue state by creating a 'fence' that can be waited upon

Constructor & Destructor Documentation

◆ ~IImageWriteQueue()

virtual IImageWriteQueue::~IImageWriteQueue ( )
inlinevirtual

Member Function Documentation

◆ CreateFence()

virtual TFuture< void > IImageWriteQueue::CreateFence ( const TFunction< void()> &  InOnFenceReached = TFunctionvoid()>())
pure virtual

(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

Implemented in FImageWriteQueue.

◆ Enqueue()

virtual TFuture< bool > IImageWriteQueue::Enqueue ( TUniquePtr< IImageWriteTaskBase > &&  InTask,
bool  bInBlockIfAtCapacity = true 
)
pure virtual

(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

Implemented in FImageWriteQueue.

◆ GetNumPendingTasks()

virtual int32 IImageWriteQueue::GetNumPendingTasks ( ) const
pure virtual

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

Implemented in FImageWriteQueue.


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