Scieneer Common Lisp 1.3.9 online documentation

thread:with-lock-held (lock &optional whostate &key :wait :timeout) &body body[Macro]

Execute the body with the lock held. If the lock is held by another thread then wait until the lock is released or an optional :timeout is reached. The results of the body are returned upon success. When :wait is nil and the lock is held by another thread then nil is returned immediately without processing the body.