Skip to main content

Module thread_id

Module thread_id 

Source

Structsยง

Thread ๐Ÿ”’
Data which is unique to the current thread while it is running. A thread ID may be reused after a thread exits.
ThreadGuard ๐Ÿ”’
ThreadIdManager ๐Ÿ”’
Thread ID manager which allocates thread IDs. It attempts to aggressively reuse thread IDs where possible to avoid cases where a ThreadLocal grows indefinitely when it is used by many short-lived threads.

Constantsยง

THREAD ๐Ÿ”’
THREAD_GUARD ๐Ÿ”’

Staticsยง

THREAD_ID_MANAGER ๐Ÿ”’

Functionsยง

get ๐Ÿ”’
Returns a thread ID for the current thread, allocating one if needed.
get_slow ๐Ÿ”’
Out-of-line slow path for allocating a thread ID.
try_get ๐Ÿ”’
Returns a thread ID for the current thread, not allocating one if needed. This avoids registering a thread-local destructor.