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 in the enabled state with an arriver-count of zero. The expected count is determined by the count argument which must be an integer greater than zero or t. If t is specified, the count is set to most-positive-fixnum; such a barrier will effectively block until it is explicitly unblocked by a call to barrier-unblock.

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-timeout argument specifies the behavior if the barrier-wait call takes longer that the specified timeout. The discount-on-abort argument specifies the behavior if the barrier-wait call is ended abruptly for some other reason.

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 status 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.

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


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page is new in the 8.2 release.
Created 2016.6.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
New since 8.2 release.