Miou_sync.Computationtype 'a state = | Cancelled of exn * Printexc.raw_backtrace| Returned of 'a| Continue of {balance : int;triggers : Trigger.t list;}val create : unit -> 'a tcreate () creates a new computation in the running state.
val try_return : 'a t -> 'a -> booltry_return c value attempts to complete the computation with the specified value and returns true on success. Otherwise returns false, which means that the computation had already been completed before.
val try_capture : 'a t -> ('b -> 'a) -> 'b -> booltry_capture c fn x calls fn x and tries to complete the computation with the value returned or the exception raised by the call and returns true on success. Otherwise returns false, which means that the computation had already been completed before.
val try_cancel : 'a t -> (exn * Printexc.raw_backtrace) -> booltry_cancel c (exn, bt) attempts to mark the computation c as cancelled with the specified exception and backtrace and returns true on success. Otherwise returns false, which means that the computation had already been completed before.
val is_running : 'a t -> boolis_running c determines whether the computation c is in the running state meaning that it has not yet been completed.
val cancelled : 'a t -> (exn * Printexc.raw_backtrace) optioncancelled c returns the exception that the computation has been cancelled with or returns None in case the computation has not been cancelled.
val raise_if_errored : 'a t -> unitraise_if_errored raises the exception the computation was cancelled with if it was errored.
val peek : 'a t -> ('a, exn * Printexc.raw_backtrace) result optionpeek c returns the result of the computation c or None in case the computation has not completed.
try_attach c trigger tries to attach the trigger to be signaled on completion of the computation and returns true on success. Otherwise, it returns false, which means that the computation has already been completed or the trigger has already been signaled.
detach c trigger signals the trigger and detaches it from the computation c.
val clean : 'a t -> unitval await : 'a t -> ('a, exn * Printexc.raw_backtrace) resultawait c waits for the computation to complete and either returns the value of the completed computation or the exception the computation was cancelled with.
val await_exn : 'a t -> 'a