ThreadBase.id

ThreadID id() @property @safe @nogc

Gets the OS identifier for this thread.

Returns

If the thread hasn't been started yet, returns ThreadID.

Otherwise, returns the result of GetCurrentThreadId on Windows, and pthread_self on POSIX.

The value is unique for the current process.