Generic FunctionPackage: mpToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Object described on page has changed in 9.0.
8.2 version

sharable-lock-lock

Arguments: sharable-lock mode &key yield-rate timeout recursive-p

Acquire a sharable-lock in the specified mode.

If the lock was acquired, The single value returned is one of the keywords:

If the call fails to acquire the lock, two values are returned. The first value is nil to indicate failure. The second value is a keyword that describes the reason:

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.

The recursive-p argument may be used to override the recursion specification in the sharable-lock instance. If omitted, nil or :default, the value in the lock instance is used. Otherwise, the value must be t, one of the keywords allowed in make-sharable-lock, or a list of these keywords. If the recursive-p setting does not allow a recursive or repeated call, the behavior is determined by the timeout argument. If the timeout argument is omitted, or non-zero, an error of type sharable-lock-recursion-error is signaled; otherwise one of the above keywords is returned as the second value.

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 would be a delay, the second value is one of the keywords listed above.

See Sharable locks in smp.htm.

See multiprocessing.htm for general information on multiprocessing in Allegro CL.


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
The object described on this page has been modified in the 9.0 release; see the Release Notes.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Object described on page has changed in 9.0.
8.2 version