Module Ecaml.Sync_or_async
type ('a, 'b) t=|Sync : ('a, 'a) t|Async : ('a, 'a Async_kernel.Deferred.t) t
val sexp_of_t : ('a -> Ppx_sexp_conv_lib.Sexp.t) -> ('b -> Ppx_sexp_conv_lib.Sexp.t) -> ('a, 'b) t -> Ppx_sexp_conv_lib.Sexp.t
val return : ('a, 'b) t -> 'a -> 'bval protect : ?allow_in_background:bool -> Core_kernel.Source_code_position.t -> (_, 'a) t -> f:(unit -> 'a) -> finally:(unit -> unit) -> 'aSee
Backgroundfor the invariants that must be maintained when running an async job in the background.