Method lrs::sync::Mutex::existing_lock

Turns a lock-guard of the underlying lock into a mutex-guard.

Syntax

impl<T> Mutex<T> {
    fn existing_lock(&'a self, guard: LockGuard<'a>) -> MutexGuard<'a, T>
}

Arguments

NameDescription
guard

The lock-guard of the underlying lock.

Return value

Returns a mutex-guard of this mutex.

Remarks

The provided lock-guard must be a lock-guard of the underlying lock or the process is aborted.