Module Luv__.Condition
type t
Binds
uv_cond_t
.
val init : unit -> (t, Luv.Error.t) Result.result
Allocates and initializes a condition variable.
Binds
uv_cond_init
. Seepthread_cond_init(3p)
.
val destroy : t -> unit
Cleans up a condition variable.
Binds
uv_cond_destroy
. Seepthread_cond_destroy(3p)
.
val signal : t -> unit
Signals a condition variable.
Binds
uv_cond_signal
. Seepthread_cond_signal(3p)
.
val broadcast : t -> unit
Signals a condition variable, waking all waiters.
Binds
uv_cond_broadcast
. Seepthread_cond_broadcast(3p)
.
val wait : t -> Luv.Mutex.t -> unit
Waits on a condition variable.
Binds
uv_cond_wait
. Seepthread_cond_wait(3p)
.
val timedwait : t -> Luv.Mutex.t -> int -> (unit, Luv.Error.t) Result.result
Like
Luv.Condition.wait
, but with a timeout.Binds
uv_cond_timedwait
. Seepthread_cond_timedwait(3p)
.The timeout is given in nanoseconds.