Module IO_sync.Future
val fullfill : 'a promise -> 'a -> unit
Fill a promise with a value. Behavior is not specified if this is called several times
val cancel : _ t -> unit
Cancel a future. Does nothing if the promise is filled already or if there's no meaningful notion of cancellation.
val make : ?on_cancel:(unit -> unit) -> unit -> 'a t * 'a promise
Make a future with the accompanying promise to fullfill it.
- parameter on_cancel
if provided, call this function upon cancellation.
type 'a wait
= 'a t