process-lock

Function

Package: mp

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 true, it is the maximum number (greater than or equal to 0.1 and less than or equal to 20) of seconds to wait before abandoning the attempt to seize lock.

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 (both models) for more information on process locks in Allegro CL.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.