Thread.getThis

Provides a reference to the calling thread.

class Thread
static
getThis
@safe nothrow @nogc
(
)

Return Value

Type: Thread

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.

Suggestion Box / Bug Report