pub trait RwLockSafe<T: ?Sized> {
// Required methods
fn read_safe(&self) -> RwLockReadGuard<'_, T>;
fn write_safe(&self) -> RwLockWriteGuard<'_, T>;
}Expand description
Poison-tolerant locking for std::sync::RwLock.
Required Methods§
Sourcefn read_safe(&self) -> RwLockReadGuard<'_, T>
fn read_safe(&self) -> RwLockReadGuard<'_, T>
Acquire a read guard, recovering it if the lock was poisoned.
Sourcefn write_safe(&self) -> RwLockWriteGuard<'_, T>
fn write_safe(&self) -> RwLockWriteGuard<'_, T>
Acquire a write guard, recovering it if the lock was poisoned.