FunctionPackage: mpToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

get-semaphore

Arguments: gate

Gates can be used as semaphores. Each gate created by make-gate has an associated semaphore count that starts at 0. get-semaphore waits, if necessary, until the gate's count is greater than 0 and then decrements the count. If this makes the count 0, the gate is then closed, as well. Using get-semaphore and put-semaphore can be more efficient than using a generic process lock when mediating access to a work queue processed by several threads. mp:enqueue and mp:dequeue use semaphores internally to get the improved efficiency. See put-semaphore.

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 was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version