Expand description
Locks that have the same behaviour as a mutex.
The Mutex in the root of the crate can be configured using the use_ticket_mutex feature.
If enabled, its implementation will be swapped out for TicketMutex and TicketMutexGuard.
This may be desirable on some platforms of workloads where regular spin mutexes have
particularly poor behaviour and regularly starve threads. ticket_mutex is disabled by default.
Re-exports§
pub use self::spin::SpinMutex;pub use self::spin::SpinMutexGuard;
Modules§
- spin
- A naïve spinning mutex.
Structs§
- Mutex
- A spin-based lock providing mutually exclusive access to data.
- Mutex
Guard - A generic guard that will protect some data access and uses either a ticket lock or a normal spin mutex.