module Condition:sig
..end
type
t
Lock
values.
Operations on conditions should be called only when the lock the
condition was constructed from is held by the current thread.
val await : t -> unit
Raises Invalid_argument
if the current thread does not hold the
associated lock.
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
).
Returns whether the condition was signaled.
Raises Invalid_argument
if the current thread does not hold the
associated lock.
Raises Runtime.Interrupted
if the thread is interrupted.
val await_nanos : t -> int64 -> int64
await_nanos c n
is similar to await c
, except that the current
thread will at most wait for n
nanoseconds. Returns the duration of
the wait, a negative value if the condition was not signaled.
Raises Invalid_argument
if the current thread does not hold the
associated lock.
Raises Runtime.Interrupted
if the thread is interrupted.
val await_uninterruptibly : t -> unit
await
except that the thread cannot be interrupted.
Raises Invalid_argument
if the current thread does not hold the
associated lock.
val signal : t -> unit
Raises Invalid_argument
if the current thread does not hold the
associated lock.
val signal_all : t -> unit
Raises Invalid_argument
if the current thread does not hold the
associated lock.