TaskPool

Constructors

this
this()

Default constructor that initializes a TaskPool with totalCPUs - 1 worker threads. The minus 1 is included because the main thread will also be available to do work.

this
this(size_t nWorkers, bool isDaemon)

Allows for custom number of worker threads.

Members

Functions

checkStatus
PoolStatus checkStatus()
Undocumented in source. Be warned that the author may not have intended to support it.
finish
void finish(bool blocking)
Undocumented in source. Be warned that the author may not have intended to support it.
isDaemon
bool isDaemon()
Undocumented in source. Be warned that the author may not have intended to support it.
isDaemon
void isDaemon(bool newVal)

Allows for custom number of worker threads.

put
void put(int factor, AbstractTask task)
Undocumented in source. Be warned that the author may not have intended to support it.
stop
void stop()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

threadIndex
size_t threadIndex;
Undocumented in source.

Variables

isSingleTask
bool isSingleTask;
Undocumented in source.
nextThreadIndex
size_t nextThreadIndex;
Undocumented in source.
queueMutex
Mutex queueMutex;
Undocumented in source.
waiterCondition
Condition waiterCondition;
Undocumented in source.
waiterMutex
Mutex waiterMutex;
Undocumented in source.
workerCondition
Condition workerCondition;
Undocumented in source.

Meta