Skip to main content

Module current

Module current 

Source

ModulesΒ§

id πŸ”’
Persistent storage for the thread ID.

ConstantsΒ§

BUSY πŸ”’
DESTROYED πŸ”’
NONE πŸ”’

StaticsΒ§

CURRENT πŸ”’

FunctionsΒ§

current
Gets a handle to the thread that invokes it.
current_or_unnamed πŸ”’
Gets a handle to the thread that invokes it. If the handle stored in thread- local storage was already destroyed, this creates a new unnamed temporary handle to allow thread parking in nearly all situations.
current_os_id πŸ”’
Gets the OS thread ID of the thread that invokes it, if available. If not, return the Rust thread ID.
drop_current πŸ”’
This should be run in crate::rt::thread_cleanup to reset the thread handle.
init_current πŸ”’
set_current πŸ”’
Tries to set the thread handle for the current thread. Fails if a handle was already set or if the thread ID of thread would change an already-set ID.
try_with_current πŸ”’
Gets a reference to the handle of the thread that invokes it, if the handle has been initialized.
with_current_name πŸ”’
Run a function with the current thread’s name.
current_idExperimental
Gets the unique identifier of the thread which invokes it.