FunctionPackage: mpToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
New since 8.2 release.

make-barrier

Arguments: count &key discount-on-abort discount-on-timeout callback disable-on-unblock name

Returns a freshly created barrier instance. The new barrier is enabled with an arriver-count of zero, and the count is set to count.

The two discount arguments (discount-on-abort and discount-on-timeout) specify what to do when a barrier-wait call ends abnormally. Each defaults to nil and a true value for either specifies that the arriver-count is decremented in that case. The discount-on-abort argument specifies the behavior if the barrier-wait call is interrupted. The discount-on-timeout argument specifies the behavior if the barrier-wait call takes longer that the specified timeout.

The disable-on-unblock argument specifies the behavior when barrier-unblock is called explicitly or implicitly. When nil, the built-in default, barrier-unblock leaves the barrier enabled and ready for a new set of arriving threads. When non-nil, the barrier is disabled.

The name argument should be a string that will be used in staus and error messages.

The callback argument specifies a function that is called in the thread where barrier-wait detects that the arriver-count has reached the specified count. The function is called with one argument, the barrier. The function is called before the barrier is unblocked and while the barrier is still locked; consequently, this function should not perform extensive computations.


Copyright (c) 1998-2012, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.2. This page is new in the 8.2 release.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
New since 8.2 release.