Macro WITH-LOCK-HELD
Syntax:
with-lock-held (lock &key timeout) declaration* forms* => results
Arguments and values:
lock -> a lock object.
timeout -> a non-negative real number.
declaration -> a declare expression; not evaluated.
forms -> an implicit progn.
results -> the values returned by the forms.
Description:
Evaluates forms. Before the forms in BODY are evaluated, lock is
acquired as if by using acquire-lock. After
the forms have been evaluated, or if a non-local control transfer is
caused (e.g. by throw or signal), the lock is released as if by
release-lock.
Exceptional situations:
Signals an error of type
type-error
is lock is not a lock object.
Signals an error of type
type-error
if timeout is neither nil nor a non-negative real number.
See also:
lock, acquire-lock, release-lock
Notes:
If the debugger is entered, it is unspecified whether the lock is released at debugger entry or at debugger exit when execution is restarted.