Skip to main content

lock

Function lock 

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

Locks mutex, taking the data even when a panicking thread poisoned it.