Thread.id

Gets the OS identifier for this thread.

class Thread
final @property
id
@safe @nogc
(
)

Return Value

Type: ThreadID

If the thread hasn't been started yet, returns ThreadID$(D.init). Otherwise, returns the result of GetCurrentThreadId on Windows, and pthread_self on POSIX.

The value is unique for the current process.

Suggestion Box / Bug Report