Module Duppy.Condition

A condition a computation waits for without holding a worker.

type t
val create : unit -> t
val signal : t -> unit

Wake every waiter, to check what it waits for again. Call it after changing what a waiter checks.

val wait : priority:'a -> 'a scheduler -> t -> (unit -> bool) -> unit

wait ~priority s c ready returns once ready () holds. Under run it parks the computation, which resumes as a task of priority. From any other thread it blocks that thread.