Module Async_kernel.Bvar

include module type of struct include Bvar end
type ('a, -'permissions) t
val sexp_of_t : ('a -> Sexplib0.Sexp.t) -> ('permissions -> Sexplib0.Sexp.t) -> ('a, 'permissions) t -> Sexplib0.Sexp.t
include Core.Invariant.S2 with type ('a, 'permissions) t := ('a, 'permissions) t
val invariant : ('a -> unit) -> ('b -> unit) -> ('a, 'b) t -> unit
val create : unit -> ('a, Core.read_write) t
val wait : ('a, [> Core.read ]) t -> 'a Deferred.t

wait t becomes determined by the next call to broadcast t a.

val broadcast : ('a, [> Core.write ]) t -> 'a -> unit

broadcast t a causes all of the non-determined deferreds returned from wait t to become determined with a. If no such deferreds exist, this operation is a no-op.

val has_any_waiters : ('a, _) t -> bool

has_any_waiters t returns true iff there has been a call to wait t since the most recent call to broadcast t.

module Portable : sig ... end

Like Bvar, but can be safely transported to and filled from any domain.