Method lrs::sync::Mutex::lock

Locks the mutex by sleeping until the mutex is unlocked if it's currently locked.

Syntax

impl<T> Mutex<T> {
    fn lock(&'a self) -> MutexGuard<'a, T>
}

Return value

Returns a mutex-guard.