Skip to main content

write_for

Function write_for 

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

Acquire a write lock within an explicit hard budget.

This is the write counterpart to read_for. A timeout must degrade the optional bookkeeping, never keep an interactive tool request queued.