ThreadGroup

This class is intended to simplify certain common programming techniques.

Members

Functions

add
void add(Thread t)

Add t to the list of tracked threads if it is not already being tracked.

create
Thread create(void function() fn)

Creates and starts a new Thread object that executes fn and adds it to the list of tracked threads.

create
Thread create(void delegate() dg)

Creates and starts a new Thread object that executes dg and adds it to the list of tracked threads.

joinAll
void joinAll(bool rethrow = true)

Iteratively joins all tracked threads. This function will block add, remove, and opApply until it completes.

opApply
int opApply(scope int delegate(ref Thread) dg)

Operates on all threads currently tracked by this object.

remove
void remove(Thread t)

Removes t from the list of tracked threads. No operation will be performed if t is not currently being tracked by this object.

Suggestion Box / Bug Report