Struct rustpython_common::lock::RawThreadMutex
source · pub struct RawThreadMutex<R: RawMutex, G: GetThreadId> { /* private fields */ }
Expand description
A mutex type that knows when it would deadlock
Implementations§
source§impl<R: RawMutex, G: GetThreadId> RawThreadMutex<R, G>
impl<R: RawMutex, G: GetThreadId> RawThreadMutex<R, G>
pub const INIT: Self = _
sourcepub fn lock(&self) -> bool
pub fn lock(&self) -> bool
Blocks for the mutex to be available, and returns true if the mutex isn’t already locked on the current thread.