engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
IImageWriteQueue类 参考abstract

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

#include <ImageWriteQueue.h>

Public 成员函数

virtual TFuture< void > CreateFence (const TFunction< void()> &InOnFenceReached=TFunction< void()>())=0
 (thread-safe) Create a fence at the current position in the queue. 更多...
 
virtual TFuture< bool > Enqueue (TUniquePtr< IImageWriteTaskBase > &&InTask, bool bInBlockIfAtCapacity=true)=0
 (thread-safe) Enqueue a new asynchronous image write task. 更多...
 
virtual int32 GetNumPendingTasks () const =0
 (thread-safe) Query the number of tasks currently pending or in progress
 

详细描述

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

成员函数说明

◆ CreateFence()

virtual TFuture< void > IImageWriteQueue::CreateFence ( const TFunction< void()> &  InOnFenceReached = TFunction< void()>())
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.

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

◆ Enqueue()

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

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

参数
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.
返回
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

该类的文档由以下文件生成: