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

with-shared-lock

Arguments: (sharable-lock &key yield-rate timeout recursive-p) &body body

Evaluate a body of code in the context of a sharable-lock acquired in shared mode. This macro is in the smputil module and may not be included in the image util (require :smputil) is evaluated.

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 keywors allowed in make-sharable-lock, or a list of these keywords.

The body expressions are evaluated as a progn body. If the lock is acquired, the body forms are evaluated, and the with-shared-lock expression returns a single value, t. If the lock is not acquired, the with-shared-lock expression returns two values as described in sharable-lock-lock.

The body expressions are evaluated as a progn body and the returned values are the values fo the last expression in the progn.

See Sharable locks in smp.htm. See also with-shared-lock.


Copyright (c) 1998-2012, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 9.0. The object described on this page has been modified in the 9.0 release; see the Release Notes.
Created 2010.1.21.

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