HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_ThreadedIO Class Reference

#include <UT_ThreadedIO.h>

Public Member Functions

 UT_ThreadedIO (exint maxqueuebytes)
 
 ~UT_ThreadedIO ()
 
int awaitIOTaskDone ()
 
int awaitIOTaskDoneMS (int64 timeout_ms)
 
int numTasks () const
 
void postTask (UT_UniquePtr< UT_ThreadedIOTask > task)
 

Detailed Description

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.

Constructor & Destructor Documentation

UT_ThreadedIO::UT_ThreadedIO ( exint  maxqueuebytes)
UT_ThreadedIO::~UT_ThreadedIO ( )

Member Function Documentation

int UT_ThreadedIO::awaitIOTaskDone ( )
inline

Blocks until next IO task is done. Returns the number of tasks left. Will return immediatenly if no active or pending tasks.

Definition at line 40 of file UT_ThreadedIO.h.

int UT_ThreadedIO::awaitIOTaskDoneMS ( int64  timeout_ms)

Blocks until next IO task is done or timeout hit, Negative timeout will block forever. Returns immediately if no active or inflight 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.


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