The lock.
These are the optional arguments used by
process-lock
:
whostate
(the status of the process while the lock is set, as seen in the Process Browser) and
timeout
(a timeout period, in seconds).
The forms to execute.
with-lock
executes
body
while holding the lock, and unlocks the lock when
body
exits. This is the recommended way of using locks. The value of
body
is returned normally.
body
is not executed if the lock could not be claimed, in which case,
with-lock
returns
nil
.