Add workerTaskPool property to access the default task pool.

This commit is contained in:
Sönke Ludwig 2021-01-14 22:21:50 +01:00
parent 7bc5606ac7
commit 353948d426

View file

@ -721,6 +721,18 @@ public void setupWorkerThreads(uint num = logicalProcessorCount())
}
/** Returns the default worker task pool.
This pool is used by `runWorkerTask`, `runWorkerTaskH` and
`runWorkerTaskDist`.
*/
@property shared(TaskPool) workerTaskPool()
{
setupWorkerThreads();
return st_workerPool;
}
/**
Determines the number of logical processors in the system.