HDK
|
#include <UT_ThreadedIO.h>
Public Member Functions | |
UT_ThreadedIO (exint maxqueuebytes) | |
~UT_ThreadedIO () | |
int | awaitIOTaskDone () |
int | numTasks () const |
void | postTask (UT_UniquePtr< UT_ThreadedIOTask > task) |
UT_ThreadedIO__ takes care of all the thread administration that threaded io requires.
Its features are to maintain single global IO thread to which all desired write jobs are posted.
Definition at line 29 of file UT_ThreadedIO.h.
UT_ThreadedIO::UT_ThreadedIO | ( | exint | maxqueuebytes | ) |
UT_ThreadedIO::~UT_ThreadedIO | ( | ) |
int UT_ThreadedIO::awaitIOTaskDone | ( | ) |
Blocks until next IO task is done. Returns the number of tasks left. Will return immediatenly if no active or pending tasks.
int UT_ThreadedIO::numTasks | ( | ) | const |
Current task count. Includes those blocking waiting to be added. Includes those still processing.
void UT_ThreadedIO::postTask | ( | UT_UniquePtr< UT_ThreadedIOTask > | task | ) |
Adds the task to the IO queue. This will block until there is enough free space on the queue.