Advanced.Future
type 'a state =
| Pending of unit -> bool
| Ready of 'a
type 'a t = {
mutable state : 'a state;
}
val is_ready : 'a t -> bool
val await : 'a t -> 'a
val map : 'a -> 'b t -> 'c t
val return : 'a -> 'a t
Create a completed future
val pending : (unit -> bool) -> 'a t
Create a pending future with completion check