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_id ๐Ÿ”’
Gets the id of 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.
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.