thisThreadID

fnThreadID thisThreadID() @property @trusted nothrow @nogc

Returns the process ID of the current thread, which is guaranteed to be unique within the current process.

Returns

A ThreadID value for the calling thread.

Example:

writefln("Current thread ID: %s", thisThreadID);