package b0

  1. Overview
  2. Docs
Software construction care

Install

Dune Dependency

Authors

Maintainers

Sources

b0-0.0.0.tbz
sha256=dadde8cfa62be9dabd805fc190b415427b4699ffe3458c153e2f3f9cc5c9b9b4
md5=f96ac96fb0182f2b97dbe9ded452544b

doc/b0.b00/B00/Memo/Fut/index.html

Module Memo.Fut

Future values.

Future value setters

type 'a set

The type for setting a future value of type 'a.

val set : 'a set -> 'a -> unit

set s v sets the future value linked to s to the value v.

Future values

type memo = t

See Memo.t

type 'a t

The type for future values of type 'a.

val create : memo -> 'a t * 'a set

create memo is (f, s) a future value f and a setter s for it. Fibers waiting on the future are scheduled by stiring memo.

val value : 'a t -> 'a option

value f is f's value if set.

val wait : 'a t -> 'a fiber

wait f k waits for f to be set and continues with k v with v the value of the future.

OCaml

Innovation. Community. Security.