Method lrs::sync::Lock::lock

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

Syntax

impl<'a> Lock {
    fn lock(&'a self) -> LockGuard<'a>
}

Return value

Returns a lock guard.