C4 Engine
C4 Engine API Documentation

class ThreadMgr

Defined in:  C4Threads.h
The Thread Manager class.
Definition

class ThreadMgr : public Manager<ThreadMgr>

Member Functions
ThreadMgr::GetWorkerThreadCount Returns the total number of worker threads.
ThreadMgr::SubmitJob Submits a job for execution.
ThreadMgr::CancelJob Cancels a single job.
ThreadMgr::CancelJobArray Cancels one or more jobs.
ThreadMgr::FinishBatch Waits for the completion of a batch.
 
ThreadMgr::Sleep Suspends the current thread for a period of time.
ThreadMgr::Yield Yields the time slice for the current thread.
Description
The ThreadMgr class manages the multithreaded job processing capabilities of the engine. The single instance of the Thread Manager is constructed during an application's initialization and destroyed at termination.

The Thread Manager's member functions are accessed through the global pointer TheThreadMgr.

See Also

Job

BatchJob

Batch