Extracted from Pike v7.4 release 35 at 2003-12-09.
pike.ida.liu.se
[Top]
predef::
Thread
Thread.Condition

Method Thread.Condition()->wait()


Method wait

void wait(Thread.MutexKey mutex_key)

Description

Wait for contition.

This function makes the current thread sleep until the condition variable is signalled. The optional argument should be the 'key' to a mutex lock. If present the mutex lock will be unlocked before waiting for the condition in one atomic operation. After waiting for the condition the mutex referenced by mutex_key will be re-locked.

Note

In Pike 7.2 and earlier it was possible to call wait() without arguments. This possibility was removed in Pike 7.3, since it lead to programs with deadlocks.

See also

Mutex->lock()