| Allegro CL version 8.2 New since 8.2 release. |
Arguments: sharable-lock mode &key yield-rate timeout
Acquire a sharable-lock
in
the specified mode.
If the lock was acquired, the returned value
is :locked
or :recursive
depending on the dynamic context.
If the lock was not acquired, the first returned value
is nil
, and a second value may be one of the
keywords :timeout
, :shared
or
:exclusive
.
The mode argument must be one of the
keywords :shared
or :exclusive
.
The yield-rate argument, if specified,
must be a positive integer, or the keyword :never
.
The specified value overrides the value in the lock instance. If the
argument is omitted, or specified as nil
,
than the value in the lock instance is used.
The timeout argument, if specified, must be a non-negative number of seconds. The value determines how long the program will wait if the lock is not immediately available. A timeout value of zero specifies that that the lock must be available immediately only.
When the timeout value is greater than zero, and a timeout occurs, the
second value is :timeout
.
When the timeout value is zero, the lock is acquired only if there is
no delay. If there is a delay, the second value
is :shared
if the delay is caused by too many
shared users; the second value is :exclusive
if the
delay is caused by an exclusive user.
See Sharable locks in smp.htm.
See multiprocessing.htm for general information on multiprocessing in Allegro CL.
Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page is new in the 8.2 release.
Created 2016.6.21.
| Allegro CL version 8.2 New since 8.2 release. |