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§
- RawOne
Shot Mutex - A one-shot mutex that panics instead of (dead)locking on contention.
- RawOne
Shot RwLock - A one-shot readers-writer lock that panics instead of (dead)locking on contention.
Type Aliases§
- OneShot
Mutex - A
lock_api::Mutex
based onRawOneShotMutex
. - OneShot
Mutex Guard - A
lock_api::MutexGuard
based onRawOneShotMutex
. - OneShot
RwLock - A
lock_api::RwLock
based onRawOneShotRwLock
. - OneShot
RwLock Read Guard - A
lock_api::RwLockReadGuard
based onRawOneShotRwLock
. - OneShot
RwLock Upgradable Read Guard - A
lock_api::RwLockUpgradableReadGuard
based onRawOneShotRwLock
. - OneShot
RwLock Write Guard - A
lock_api::RwLockWriteGuard
based onRawOneShotRwLock
.