LispWorks User Guide and Reference Manual > 35 The MP Package

NextPrevUpTopContentsIndex

condition-variable-wait

Function
Summary

Waits for a given condition variable to be signalled.

Package

mp

Signature

condition-variable-wait condvar lock &key timeout wait-reason => wakep

Arguments

condvar

A condition variable

lock

A mp:lock

timeout

nil or a positive real

wait-reason

A string

Values

wakep

A generalized boolean

Description

The function condition-variable-wait waits at most timeout seconds for the condition variable condvar to be signalled. The lock lock is released while waiting and claimed again before returning. The caller must be holding the lock lock before calling this function.

The return value wakep is non-nil if the signal was received or nil if there was a timeout. If timeout is nil , condition-variable-wait waits indefinitely.

If wait-reason is non-nil, it is used as the wait-reason while waiting for the signal.

Notes

timeout controls how long to wait for the signal: before returning, the function waits to claim the lock, possibly indefinitely.

See also

condition-variable-wait-count
make-condition-variable


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex