Skip to main content

read_for

Function read_for 

Source
pub fn read_for<T: Send + Sync + 'static>(
    lock: &Arc<RwLock<T>>,
    context: &str,
    timeout: Duration,
) -> Option<OwnedRwLockReadGuard<T>>
Expand description

Acquire a read lock within an explicit hard budget.

Use this on latency-critical request paths where adaptive I/O recovery must not turn a best-effort session update into a multi-second user-visible wait.