Struct miri::concurrency::sync::Mutex
source · struct Mutex {
owner: Option<ThreadId>,
lock_count: usize,
queue: VecDeque<ThreadId>,
clock: VClock,
}
Expand description
The mutex state.
Fields§
§owner: Option<ThreadId>
The thread that currently owns the lock.
lock_count: usize
How many times the mutex was locked by the owner.
queue: VecDeque<ThreadId>
The queue of threads waiting for this mutex.
clock: VClock
Mutex clock. This tracks the moment of the last unlock.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mutex
impl RefUnwindSafe for Mutex
impl !Send for Mutex
impl !Sync for Mutex
impl Unpin for Mutex
impl UnwindSafe for Mutex
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 112 bytes