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
|
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.
| InOnFenceReached | A callback to be invoked when the fence has been reached (ie all work ahead of it in the queue has been completed) |
|
pure virtual |
(thread-safe) Enqueue a new asynchronous image write task.
| InTask | A unique pointer to a task to perform on a thread when available. Pass with MoveTemp(). |
| bInBlockIfAtCapacity | Wait 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. |