A continuation that captures the current Async execution context.
It can be scheduled for future invocation by installing it in a deferred.
val create : ('a ‑> unit) ‑> 'a t
create k
creates a handler by coupling the continuation k
together with the
evaluation context that is current at the time create
is called. Whenever this
handler is later invoked, it will happen in this saved evaluation context.
filter h ~f
makes the eventual execution of the handler h
on a value v
dependent
on whether predicate f
holds of v
val install : 'a t ‑> 'a Deferred.t ‑> unit ‑> unit
install h d
behaves like upon
except that it also returns a uninstall function
that, when called, uninstalls the handler
val schedule : 'a t ‑> 'a ‑> unit
schedule h v
schedules the handler h
to run at some point in the future by being
called on value v