The Nebula Device 3: Jobs::TPJobThreadPool Class Reference

The Nebula Device 3

Jobs::TPJobThreadPool Class Reference

#include <tpjobthreadpool.h>


Detailed Description

Manages the thread-pool, distributes TPJobSlice objects to the worker threads.

FIXME: class is currently not thread-safe!

(C) 2009 Radon Labs GmbH

Public Member Functions

 TPJobThreadPool ()
 constructor
 ~TPJobThreadPool ()
 destructor
void Setup ()
 setup the thread pool
void Discard ()
 discard the thread pool
bool IsValid () const
 return true if object is setup
void PushSync (const Threading::Event *syncEvent)
 push a sync command into the thread pool
void PushJobSlices (TPJobSlice *firstSlice, SizeT numSlices, IndexT threadIndex=InvalidIndex)
 push job slices into the the thread pool
IndexT GetNextThreadIndex () const
 get a suitable worker thread index (optimally a thread with currently no load)