Skip to main content

read_arc_rwlock

Function read_arc_rwlock 

Source
pub fn read_arc_rwlock<T>(
    arc_rwlock: &Arc<RwLock<T>>,
) -> Option<RwLockReadGuard<'_, T>>
Expand description

Helper function to read-lock an Arc<RwLock> and access its value Returns None if the lock is poisoned Note: This returns a guard, not a reference, so it cannot be used in keypaths directly