Atomically unlocks a mutex guard and waits for a signal on this condvar before re-locking the mutex.
impl Condvar {
fn wait<T>(&self, guard: MutexGuard<'a, T>) -> MutexGuard<'a, T>
}| Name | Description |
|---|---|
| guard | The mutex guard to be unlocked. |
Returns a guard created by re-locking the mutex of the guard argument.
While the condition variable is in use, the condition variable can only be used with the same mutex. The condition variable is in use while there are users waiting on it. If the condition variable is used with another a mutex, the process is aborted.