Function lock

Source
fn lock<T>(m: &Mutex<T>) -> MutexGuard<'_, T>
Expand description

Poison-tolerant lock: a panicking worker must never take the UI down with it.