pub enum MutexType {
Normal,
ErrorCheck,
Recursive,
}Expand description
The type of the mutex. See pthread_mutex_lock for more information.
Variants§
Normal
If a thread already holds a lock and attempts to lock the mutex again,
the POSIX standard mandates that a deadlock occur. However, some platforms will return a
MutexLockError::Deadlock despite the mutex not
being error-checked.
ErrorCheck
If a thread already holds a lock and attempts to lock the mutex again,
MutexLockError::Deadlock is returned.
Recursive
If a thread already holds a lock and attempts to lock the mutex again, the call will succeed as long as the recursive lock limit is not exceeded.
Trait Implementations§
impl Copy for MutexType
impl Eq for MutexType
impl StructuralPartialEq for MutexType
Auto Trait Implementations§
impl Freeze for MutexType
impl RefUnwindSafe for MutexType
impl Send for MutexType
impl Sync for MutexType
impl Unpin for MutexType
impl UnsafeUnpin for MutexType
impl UnwindSafe for MutexType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more