Thread.getThis

Thread getThis() @safe nothrow @nogc

Provides a reference to the calling thread.

Returns

The thread object representing the calling thread. The result of

deleting this object is undefined. If the current thread is not attached to the runtime, a null reference is returned.