module CountDownLatch:sig
..end
type
t
val make : int32 -> t
make n
returns a countdown latch waiting for n
threads.
Raises Invalid_argument
if n
is negative.
val await : t -> unit
Raises Runtime.Interrupted
if the thread is interrupted.
val await_time : t -> int64 -> TimeUnit.t -> bool
await_time c t u
is similar to await c
, except that the current
thread will at most wait for t
(time value whose unit is u
).
Raises Runtime.Interrupted
if the thread is interrupted.
val count_down : t -> unit
val get_count : t -> int64