Skip to main content
Module thread_id
thread_
local
1.1.10
Module thread_
id
Module Items
Structs
Constants
Statics
Functions
In crate thread_
local
thread_local
Module
thread_
id
Copy item path
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.
Thread
Guard
๐
Thread
IdManager
๐
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.