pub enum MutexProtocol {
None,
Inherit,
Protect,
}Expand description
The protocol to be used with the mutex. See pthread_mutexattr_getprotocol for more information.
Variants§
None
The lock-owning thread’s priority is unaffected by the mutex.
Inherit
The lock-owning thread’s priority is the maximum of its own priority and the priority of all threads waiting on the mutex.
Not available on NetBSD, whose pthread_mutexattr_setprotocol rejects
PTHREAD_PRIO_INHERIT with ENOTSUP while accepting the other two protocols.
Protect
The lock-owning thread’s priority is the maximum of its own priority and the priority ceilings of every mutex it holds that was built with this protocol, whether or not anyone is blocked on them.
Set the ceilings with MutexBuilder::with_priority_ceiling. Not available on musl or
Android, neither of which implements the POSIX Thread Priority Protection option: there are
no ceilings there for this protocol to read, and both reject it outright.
Trait Implementations§
Source§impl Clone for MutexProtocol
impl Clone for MutexProtocol
Source§fn clone(&self) -> MutexProtocol
fn clone(&self) -> MutexProtocol
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more