pub trait MutexExt<T> {
// Required method
fn lock_or_recover(&self) -> MutexGuard<'_, T>;
}Expand description
Extension trait adding poison-recovering locking to Mutex.
Required Methods§
Sourcefn lock_or_recover(&self) -> MutexGuard<'_, T>
fn lock_or_recover(&self) -> MutexGuard<'_, T>
Locks the mutex, recovering the guard if it is poisoned.
On poison, logs a warning naming the call site and returns the inner guard anyway.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".