Struct futex::raw::Mutex
[−]
[src]
pub struct Mutex { /* fields omitted */ }
A simple mutual exclusion lock (mutex).
This is not designed for direct use but as a building block for locks.
Thus, it is not reentrant and it may misbehave if used incorrectly (i.e. you can release even if someone else is holding it). It's also not fair.
Trait Implementations
impl Mutex for Futex
[src]
type LockState = ()
fn lock(&self)
Acquires the lock.
This blocks until the lock is ours.
fn try_lock(&self) -> Option<()>
Attempts to acquire the lock without blocking.
Returns true
if the lock was acquired, false
otherwise.
fn unlock(&self, _: ())
Releases the lock.