When this is
t
, the lock is pushed onto the list
mp:*important-locks*
. Locks in this list are automatically freed when the holder process finishes.
This should be
nil
for locks which are managed completely by the application. It is wasteful to record all locks in a global list if there is no need to free them automatically.
This might be appropriate when two processes sharing a lock must both be running for the system to be consistent. If one process dies, then the other one kills itself. Thus the system does not need to worry about freeing the lock because no-one else could be waiting on it forever after the first process dies.
The name of the lock.
t
or
nil
. When lock is
t
, the lock is set. The default is
nil
.
The owner of the lock.
The number of times the lock has been set. The default is 0.
make-lock
returns a lock object. See the
Multiprocessing
chapter of the
LispWorks User Guide
for a general description of locks.
cl-user 4> (setq *my-lock* (mp:make-lock
:name "my-lock"))
#<LOCK "my-lock" "Unlocked" NIL 0 7909676)