pub fn timed_lock<'a, T>(mutex: &'a Mutex<T>, ctx: &str) -> MutexGuard<'a, T>where
T: ?Sized,Expand description
Acquire a mutex guard with timing and poison recovery.
Logs a warning if acquisition takes > 5 ms (contention hot-spot indicator). Recovers from a poisoned mutex rather than propagating the error.