pub struct LocalMutexNode { /* private fields */ }
thread_local
only.Expand description
A handle to a MutexNode
stored at the thread local storage.
Thread local nodes can be claimed for temporary, exclusive access during runtime for locking purposes. Node handles refer to the node stored at the current running thread.
Just like MutexNode
, this is an opaque type that holds metadata for the
raw::Mutex
’s waiting queue. You must declare a thread local node with
the thread_local_node!
macro, and provide the generated handle to the
appropriate raw::Mutex
locking APIs. Attempting to lock a mutex with a
thread local node that already is in use for the locking thread will cause
a panic. Handles are provided by reference to functions.
See: try_lock_with_local_then
, lock_with_local_then
,
try_lock_with_local_then_unchecked
or lock_with_local_then_unchecked
.