Skip to main content

read

Function read 

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

Acquire a read lock with an adaptive timeout based on I/O health. Returns None on timeout (caller must provide graceful fallback). Records a freeze event for self-healing if the timeout is hit.

Callers are expected to already be in a blocking context (e.g. via block_in_place in the dispatch layer). This function uses Handle::block_on directly to avoid nested block_in_place calls that would consume additional blocking-pool threads.