Struct parking_lot::RawMutex [−][src]
pub struct RawMutex { /* fields omitted */ }
Raw mutex type backed by the parking lot.
Trait Implementations
impl RawMutexTrait for RawMutex
[src]
impl RawMutexTrait for RawMutex
const INIT: RawMutex
INIT: RawMutex = RawMutex{state: ATOMIC_U8_INIT,}
Initial value for an unlocked mutex.
type GuardMarker = GuardNoSend
Marker type which determines whether a lock guard should be Send
. Use one of the GuardSend
or GuardNoSend
helper types here. Read more
fn lock(&self)
[src]
fn lock(&self)
Acquires this mutex, blocking the current thread until it is able to do so.
fn try_lock(&self) -> bool
[src]
fn try_lock(&self) -> bool
Attempts to acquire this mutex without blocking.
fn unlock(&self)
[src]
fn unlock(&self)
Unlocks this mutex.
impl RawMutexFair for RawMutex
[src]
impl RawMutexFair for RawMutex
fn unlock_fair(&self)
[src]
fn unlock_fair(&self)
Unlocks this mutex using a fair unlock protocol.
fn bump(&self)
[src]
fn bump(&self)
Temporarily yields the mutex to a waiting thread if there is one. Read more
impl RawMutexTimed for RawMutex
[src]
impl RawMutexTimed for RawMutex
type Duration = Duration
Duration type used for try_lock_for
.
type Instant = Instant
Instant type used for try_lock_until
.
fn try_lock_until(&self, timeout: Instant) -> bool
[src]
fn try_lock_until(&self, timeout: Instant) -> bool
Attempts to acquire this lock until a timeout is reached.
fn try_lock_for(&self, timeout: Duration) -> bool
[src]
fn try_lock_for(&self, timeout: Duration) -> bool
Attempts to acquire this lock until a timeout is reached.