Version 0.8.8

Common Lisp threading library



with-recursive-lock-held (lock &key timeout) declaration* forms* => results

Arguments and values:

lock -> a recursive-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.


Evaluates forms. Before the forms in BODY are evaluated, lock is acquired as if by using acquire-recursive-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-recursive-lock.

Exceptional situations:

Signals an error of type type-error is lock is not a recursive-lock object.
Signals an error of type type-error if timeout is neither nil nor a non-negative real number.

See also:

recursive-lock, acquire-recursive-lock, release-recursive-lock


If the debugger is entered, it is unspecified whether the lock is released at debugger entry or at debugger exit when execution is restarted.

Last updated on 2022-01-07
Published on 2022-01-07
Edit on GitHub