Atomically unlocks a lock guard and waits for a signal on this condvar.
impl RawCondvar {
fn wait2(&self, lock: &'a Lock, guard: LockGuard<'b>) -> LockGuard<'a>
}| Name | Description |
|---|---|
| lock | The lock to be locked before returning. |
| guard | The lock guard to be unlocked. |
Returns a guard created by locking the lock argument.
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.
The lock in question in the above paragraph is the lock passed as the lock argument. The guard argument doesn't have to be related to the lock in any way.