sig
type t = Raw_monitor.t
type 'a with_optional_monitor_name =
?here:Core.Std.Source_code_position.t ->
?info:Core.Std.Info.t -> ?name:string -> 'a
val create : (unit -> t) with_optional_monitor_name
val name : t -> Core.Std.Info.t
val current : unit -> t
val errors : t -> exn Tail.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 :
(?extract_exn:bool ->
?run:[ `Now | `Schedule ] ->
?rest:[ `Ignore | `Raise ] ->
(unit -> 'a Deferred.t) -> ('a, exn) Core.Std.Result.t Deferred.t)
with_optional_monitor_name
val try_with_rest_handling :
[ `Default of [ `Ignore | `Raise ] | `Force of [ `Ignore | `Raise ] ] ref
val try_with_ignored_exn_handling :
[ `Eprintf | `Ignore | `Run of exn -> unit ] ref
val handle_errors :
((unit -> 'a Deferred.t) -> (exn -> unit) -> 'a Deferred.t)
with_optional_monitor_name
val catch_stream :
((unit -> unit) -> exn Tail.Stream.t) with_optional_monitor_name
val catch : ((unit -> unit) -> exn Deferred.t) with_optional_monitor_name
val protect :
((unit -> 'a Deferred.t) ->
finally:(unit -> unit Deferred.t) -> 'a Deferred.t)
with_optional_monitor_name
val main : t
val kill : t -> unit
val is_alive : t -> bool
module Exported_for_scheduler :
sig
type 'a with_options = ?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
val preserve_execution_context :
('a -> unit) -> ('a -> unit) Core.Std.Staged.t
val preserve_execution_context' :
('a -> 'b Deferred.t) -> ('a -> 'b Deferred.t) Core.Std.Staged.t
end
val sexp_of_t : t -> Sexplib.Sexp.t
end