Module CCThread.Barrier
val create : unit -> t
Create a barrier.
val reset : t -> unit
Reset to initial (non-triggered) state.
val wait : t -> unit
wait b
waits for barrierb
to be activated byactivate b
. All threads calling this wait untilactivate b
is called. Ifb
is already activated,wait b
does nothing.
val activate : t -> unit
activate b
unblocks all threads that were waiting onb
.
val activated : t -> bool
activated b
returnstrue
iffactivate b
was called, andreset b
was not called since. In other words,activated b = true
meanswait b
will not block.