core.thread.threadgroup

The osthread module provides types used in threads modules.

Types 1

This class is intended to simplify certain common programming techniques.

Fields
Thread[Thread] m_all
Methods
Thread create(void function() fn)Creates and starts a new Thread object that executes fn and adds it to the list of tracked threads.
Thread create(void delegate() dg)Creates and starts a new Thread object that executes dg and adds it to the list of tracked threads.
void add(Thread t)Add t to the list of tracked threads if it is not already being tracked.
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.
int opApply(scope int delegate(ref Thread) dg)Operates on all threads currently tracked by this object.
void joinAll(bool rethrow = true)Iteratively joins all tracked threads. This function will block add, remove, and opApply until it completes.