C4 Engine
C4 Engine API Documentation


Defined in:  C4Threads.h
Returns the worker thread index for a job.

int32 GetThreadIndex(voidconst;

After a job has been dispatched to a worker thread, the GetThreadIndex function returns the index of the worker thread on which the job is executing. The index is between 0 and n − 1, inclusive, where n is the number of worker threads returned by the ThreadMgr::GetWorkerThreadCount function. The value of the thread index is valid only when the GetThreadIndex function is called from within the job's execution function.
See Also