| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version |
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-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version |