Skip to main content

Module mutex

Module mutex 

Source
๐Ÿ”ฌThis is a nightly-only experimental API. (sync_poison_mod #134646)

Re-exportsยง

use crate::cell::UnsafeCell; ๐Ÿ”’
use crate::fmt; ๐Ÿ”’
use crate::marker::PhantomData; ๐Ÿ”’
use crate::mem; ๐Ÿ”’
use crate::mem::ManuallyDrop; ๐Ÿ”’
use crate::ops::Deref; ๐Ÿ”’
use crate::ops::DerefMut; ๐Ÿ”’
use crate::ptr::NonNull; ๐Ÿ”’
use crate::sync::LockResult; ๐Ÿ”’
use crate::sync::PoisonError; ๐Ÿ”’
use crate::sync::TryLockError; ๐Ÿ”’
use crate::sync::TryLockResult; ๐Ÿ”’
use crate::sync::poison; ๐Ÿ”’ Experimental
use crate::sys::sync as sys; ๐Ÿ”’

Structsยง

MappedMutexGuardExperimental
An RAII mutex guard returned by MutexGuard::map, which can point to a subfield of the protected data. When this structure is dropped (falls out of scope), the lock will be unlocked.
MutexExperimental
A mutual exclusion primitive useful for protecting shared data
MutexGuardExperimental
An RAII implementation of a โ€œscoped lockโ€ of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.

Functionsยง

guard_lock ๐Ÿ”’
For use in nonpoison::condvar.
guard_poison ๐Ÿ”’
For use in nonpoison::condvar.