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§