Struct mcslock::raw::LocalMutexNode
source · pub struct LocalMutexNode { /* private fields */ }
Available on crate feature
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 used for the locking thread will cause
a panic. Handles are provided by reference to functions.
See: try_lock_with_local
, lock_with_local
,
try_lock_with_local_unchecked
or lock_with_local_unchecked
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocalMutexNode
impl RefUnwindSafe for LocalMutexNode
impl Send for LocalMutexNode
impl Sync for LocalMutexNode
impl Unpin for LocalMutexNode
impl UnwindSafe for LocalMutexNode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more