| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |
Arguments: lock &optional lock-value whostate timeout
This function seizes lock with the value lock-value. If the lock is already locked, the process calling process-lock waits for it to become free. While it waits, its whostate is temporarily replaced by the whostate argument. The default value for whostate is "Lock".
The value of the lock-value argument is stored in
the locker slot of the lock (accessed by process-lock-locker). The default value for
lock-value is the value of *current-process*
. Note that
any non-nil
value can be specified as the
value of lock-value (specifying nil
means that the lock is not seized because a lock
with nil
in the locker slot is unlocked).
If timeout is specified and non-nil
, it should be zero or positive number. It then
specifies the maximum number of seconds to wait before abandoning the
attempt to seize lock (with a value 0 meaning
seize the lock if and only if it is currently free).
If process-lock
suceeds in seizing the lock, it returns a non-nil
value. If it gives up (because, e.g., it times
out), nil
is returned.
Locks are freed with process-unlock. See also with-process-lock and make-process-lock.
See multiprocessing.htm for general information on multiprocessing in Allegro CL and see Process locks for more information on process locks in Allegro CL.
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.
| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |