Method lrs::sync::RawCondvar::wait

Atomically unlocks a lock guard and waits for a signal on this condvar before re-locking the lock.

Syntax

impl RawCondvar {
    fn wait(&self, guard: LockGuard<'a>) -> LockGuard<'a>
}

Arguments

NameDescription
guard

The lock guard to be unlocked.

Return value

Returns a guard created by re-locking the lock of the guard argument.

Remarks

While the condition variable is in use, the condition variable can only be used with the same lock. The condition variable is in use while there are users waiting on it. If the condition variable is used with another a lock, the process is aborted.