sig
type t = Execution_context.t Raw_monitor.t
val sexp_of_t : t -> Sexplib.Sexp.t
val create : ?name:string -> unit -> t
val name : t -> string
val current : unit -> t
val errors : t -> exn Raw_async_stream.t
val error : t -> exn Deferred.t
val extract_exn : exn -> exn
val has_seen_error : t -> bool
val send_exn : t -> ?backtrace:[ `Get | `This of string ] -> exn -> unit
val try_with :
?name:string ->
(unit -> 'a Deferred.t) -> ('a, exn) Core.Std.Result.t Deferred.t
val try_with_raise_rest :
?name:string ->
(unit -> 'a Deferred.t) -> ('a, exn) Core.Std.Result.t Deferred.t
val handle_errors :
?name:string -> (unit -> 'a Deferred.t) -> (exn -> unit) -> 'a Deferred.t
val catch_stream : ?name:string -> (unit -> unit) -> exn Raw_async_stream.t
val catch : ?name:string -> (unit -> unit) -> exn Deferred.t
val protect :
?name:string ->
(unit -> 'a Deferred.t) ->
finally:(unit -> unit Deferred.t) -> 'a Deferred.t
val main : t
module Exported_for_scheduler :
sig
type 'a with_options =
?block_group:Block_group.t ->
?monitor:t -> ?priority:Priority.t -> 'a
val within' : ((unit -> 'a Deferred.t) -> 'a Deferred.t) with_options
val within : ((unit -> unit) -> unit) with_options
val within_v : ((unit -> 'a) -> 'a option) with_options
val schedule' : ((unit -> 'a Deferred.t) -> 'a Deferred.t) with_options
val schedule : ((unit -> unit) -> unit) with_options
val within_context :
Execution_context.t -> (unit -> 'a) -> ('a, unit) Core.Std.Result.t
end
val ounit_tests : unit -> OUnit.test
end