Skip to main content

lock_until

Function lock_until 

Source
pub fn lock_until<T>(
    mutex: &Mutex<T>,
    deadline: Instant,
) -> Option<MutexGuard<'_, T>>
Expand description

Acquires a lock without exceeding the caller’s deadline.

Poisoned locks are recovered: everything guarded this way only holds memoized lookup state.