val create : unit -> t
Return a new condition variable.
val wait : t -> Mutex.t -> unit
wait c m
atomically unlocks the mutexm
and suspends the calling process on the condition variablec
. The process will restart after the condition variablec
has been signalled. The mutexm
is locked again beforewait
returns.
val signal : t -> unit
signal c
restarts one of the processes waiting on the condition variablec
.
val broadcast : t -> unit
broadcast c
restarts all processes waiting on the condition variablec
.