Thread

Utility class to manipulate threads.

Threads provide a way to run multiple parts of the code in parallel.

When you launch a new thread, the execution is split and both the new thread and the caller run in parallel.

To use a Thread, you construct it directly with the function to execute as the entry point of the thread.

Constructors

this
this(void function() fn, size_t sz)

Construct the thread from a functor with no argument

this
this(void delegate() dg, size_t sz)

Construct the thread from a delegate with no argument

Destructor

~this
~this()

Destructor

Members

Functions

launch
void launch()

Run the thread.

wait
void wait()

Wait until the thread finishes.

Static functions

XInitThreads
void XInitThreads()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta