Locks a lock and calls a predicate. If this returns
, performs the equivalent of condition-variable-wait. Optionally calls a function on return.
It then applies the function
to the arguments
. If this call returns
it performs the equivalent of a call to condition-variable-wait, passing it the
Before returning, the lock is unlocked (in an unwinding form) as in with-lock.
returns if it is supplied. If
is not supplied,
returns the result of the predicate if this is not
, otherwise it returns the result of the equivalent call to condition-variable-wait.
lock-and-condition-variable-waitmakes it much easier to avoid errors when using condition variables.
lock-and-condition-variable-waitdoes not lock on return, which makes it it much more efficient than the equivalent code using with-lock and condition-variable-wait.
lock-and-condition-variable-wait. The non-locking one can be used without the lock when it is useful.
LispWorks User Guide and Reference Manual - 21 Dec 2011