Skip to main content

RwLockSafe

Trait RwLockSafe 

Source
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§

Source

fn read_safe(&self) -> RwLockReadGuard<'_, T>

Acquire a read guard, recovering it if the lock was poisoned.

Source

fn write_safe(&self) -> RwLockWriteGuard<'_, T>

Acquire a write guard, recovering it if the lock was poisoned.

Implementations on Foreign Types§

Source§

impl<T: ?Sized> RwLockSafe<T> for RwLock<T>

Implementors§