package miou

  1. Overview
  2. Docs
Composable concurrency primitives for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

miou-0.5.5.tbz
sha256=60967f9e5aa9c56efb9a171a9ad08cc7977afdff4c55506fd5008ecf9e44cae0
sha512=3bf1e9b0d68f78926ee71776667ba5198b72910bd16c15088d7217c3653ba20d454eb4b3ce0ce9b7e2fa5b7e5b2510a861cddaf71bd89ec6874c0b4b37af96ab

doc/miou/Miou/Lazy/index.html

Module Miou.LazySource

Sourceexception Undefined
Sourcetype !'a t

Represents a deferred computation of suspension.

Sourceval from_val : 'a -> 'a t

from_val value returns an already forced suspension whose result is the given value.

Sourceval from_fun : (unit -> 'a) -> 'a t

from_fun fn returns a suspension.

Sourceval force : 'a t -> 'a

force t forces the suspension, i.e. computes fn () using the fn passed to from_fun, stores the result of the computation to the suspension and reproduces its result. In case the suspension has already been forced the computation is skipped and stored result is reproduced.

  • raises Undefined

    in case the suspension is currently being forced by the current promise.