Skip to main content

lock

Function lock 

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

Locks mutex. A panic while it was held doesn’t stop the program from using the value, as Xur values have no invariants a panic could break.