getThreadId
fn
ulong getThreadId() @safe @nogc nothrowReturns the current thread ID for use with cancellation functions.
This is the thread ID as seen by libdar/pthread, suitable for passing to cancelThread(), cancelStatus(), and cancelClear().
Returns
the thread ID as an unsigned 64-bit integer.