Method lrs::sync::Mutex::try_lock

Tries to lock the mutex if it's currently unlocked.

Syntax

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

Return value

Returns a guard if the operation succeeded.