Newton Dynamics  4.00
dThreadPool Class Reference
Inheritance diagram for dThreadPool:
dSyncMutex dThread dSemaphore dAtomic< bool > ndScene ndSceneMixed ndWorldScene< ndSceneMixed > ndWorldMixedScene ndWorldSegregatedScene

Public Member Functions

D_CORE_API dThreadPool (const char *const baseName)
 
D_CORE_API dInt32 GetCount () const
 
D_CORE_API void SetCount (dInt32 count)
 
D_CORE_API void TickOne ()
 
D_CORE_API void ExecuteJobs (dThreadPoolJob **const jobs)
 
D_CORE_API void Begin ()
 
D_CORE_API void End ()
 
- Public Member Functions inherited from dSyncMutex
D_CORE_API dSyncMutex ()
 Create and initialize counter to zero.
 
D_CORE_API ~dSyncMutex ()
 Destroy mutex.
 
D_CORE_API void Sync ()
 Synchronize with another worker threads. More...
 
D_CORE_API void Tick ()
 Increment internal variable m_count by one.
 
D_CORE_API void Release ()
 Decrement internal variable m_count by one and signal the thread to wakeup.
 
- Public Member Functions inherited from dThread
D_CORE_API void SetName (const char *const name)
 
D_CORE_API void Finish ()
 
D_CORE_API void Signal ()
 
virtual void ThreadFunction ()=0
 
- Public Member Functions inherited from dSemaphore
D_CORE_API dSemaphore ()
 Create and initialize counter to zero.
 
D_CORE_API ~dSemaphore ()
 Destroy semaphore.
 
D_CORE_API dInt32 GetCount () const
 Returns counter counter value.
 
D_CORE_API bool Wait ()
 Synchronize with another threads. More...
 
D_CORE_API void Signal ()
 Notify a thread blocked by member function Wait to wake and test m_counter again. More...
 
D_CORE_API void Terminate ()
 Notify a waiting thread on member function Wait that is time to exit the thread loop.
 
- Public Member Functions inherited from dAtomic< bool >
 dAtomic (bool val)
 

Additional Inherited Members

- Protected Attributes inherited from dThread
char m_name [32]