Crate one_shot_mutex
source ·Expand description
One-shot locks that panic instead of (dead)locking on contention.
These locks allow no contention and panic instead of blocking on lock
if they are already locked.
This is useful in situations where contention would be a bug,
such as in single-threaded programs that would deadlock on contention.
See the RawOneShotMutex
and RawOneShotRwLock
types for more information.
Structs§
- A one-shot mutex that panics instead of (dead)locking on contention.
- A one-shot readers-writer lock that panics instead of (dead)locking on contention.
Type Aliases§
- A
lock_api::Mutex
based onRawOneShotMutex
. - A
lock_api::MutexGuard
based onRawOneShotMutex
. - A
lock_api::RwLock
based onRawOneShotRwLock
. - A
lock_api::RwLockReadGuard
based onRawOneShotRwLock
. - A
lock_api::RwLockUpgradableReadGuard
based onRawOneShotRwLock
. - A
lock_api::RwLockWriteGuard
based onRawOneShotRwLock
.