Package: bordeaux-threads

Function condition-wait

Lambda List

condition-wait (condition-variable lock)

Details

Atomically release lock and enqueue the calling thread waiting for condition-variable. The thread will resume when another thread has notified it using condition-notify; it may also resume if interrupted by some external event or in other implementation-dependent circumstances: the caller must always test on waking that there is threading to be done, instead of assuming that it can go ahead.

However and for whatever reason the thread is resumed, the system always reacquires lock before returning to the caller. It is an error to call this unless from the thread that holds lock.

In an implementation that does not support multiple threads, this function signals an error.