pub fn lock<'a, T>(
mutex: &'a Mutex<T>,
what: &'static str,
) -> Result<MutexGuard<'a, T>, TapError>Expand description
Locks mutex, naming it in the error when it is poisoned.
ยงErrors
Returns TapError::Poisoned when another thread panicked holding it.