Module Thread_safe_ivar

A simple thread-safe ivar implementation.

type 'a t
val sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
val create : unit -> _ t @@ portable
val fill : 'a t -> 'a -> unit @@ portable
val read : 'a t -> 'a @@ portable

read t blocks until t is filled.

val peek : 'a t -> 'a option @@ portable