pub struct GenericRawMutex<L: RawLock> { /* private fields */ }Expand description
A generic lock that wraps a RawLock implementation and tracks
whether the caller has locked recursively.
Implementations§
Source§impl<L: RawLock> GenericRawMutex<L>
impl<L: RawLock> GenericRawMutex<L>
Sourcepub fn lock_non_reentrant<R>(&self, f: impl FnOnce() -> R) -> R
pub fn lock_non_reentrant<R>(&self, f: impl FnOnce() -> R) -> R
Runs the callback with this lock locked.
Note that this function is not reentrant, calling it reentrantly will panic.