Generic Function | Package: mp | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 This page is new in 10.1.

## sharable-lock-idle-p

Arguments: sharable-lock &optional modifier whostate

This page was inadvertantly left out of the original sharable lock documentation.

The method defined when the first argument is a `sharable-lock` instance examines the state of the lock and returns `t` if the lock is idle, or `nil` if it is not. The optional arguments add some additional behavior.

modifier | whostate | Behavior
`nil` | [ignored] | Test the lock and return immediately.
`n` <= 0 | [ignored] | Test the lock and return immediately.
`n` > 0 | A string, will be the whostate while waiting. Default is "sharable-lock-idle-p" in modern Lisps and "SHARABLE-LOCK-IDLE-P" in ANSI Lisps. | Test the lock, and if not idle, wait at most `n` seconds. `n` may be any real number.
`:show` | [ignored] | Print messages detailing the lock state, and return `t` or `nil`.
`:show-if-not` | [ignored] | Like `:show` but print details only if the lock is not idle.
`:wait` | A string, will be the whostate while waiting. Default is "sharable-lock-idle-p" in modern Lisps and "SHARABLE-LOCK-IDLE-P" in ANSI Lisps. | Test the lock and, if not idle, wait indefinitely until it is idle.
Other non-`nil` | [ignored] | Test the lock and return immediately.

As in all cases where objects may be modified by multiple threads, the returned value is obsolete the moment it is returned.

See Sharable locks in smp.htm.

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

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page is new in the 10.1 release.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 This page is new in 10.1.