B0_std.BvalBlocking values.
Note. In direct style the Fut.t values would go away. For now be bundled lazy blocking values in the same structure.
Note. This is an IVar.
val of_val : 'a -> 'a tof_val v is a (non-)blocking value holding v.
val of_lazy_fun : (unit -> 'a) -> 'a tval is_lazy : 'a t -> boolis_lazy bv is true iff bv is a lazily triggered value.
val set : 'a setter -> 'a -> unitset s v sets the blocking value of_setter s to value v. Raises Invalid_argument if set is already set.
val try_set : 'a setter -> 'a -> booltry_set s v is true if iv was set to v and false if iv was already set.
val try_set' : 'a setter -> (unit -> 'a) -> booltry_set' s f is true if iv was set to f () and false if iv was already set, in the latter case f may be or may not have been called.
get bv is the value of bv. In direct style, this should be a blocking call.
val poll : 'a t -> 'a optionpoll bv is None if get bv would block and Some _ if it does not block. If bv was created with of_lazy_fun, this ensure the computation gets triggered.
val stir : 'a t -> unitstir bv is ignore (poll v). Useful if you know bv will be needed later and may be a of_lazy_fun.