sig
type 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 -> Monitor.t) Monitor.with_optional_monitor_name
val name : Monitor.t -> Core.Std.Info.t
val current : unit -> Monitor.t
val errors : Monitor.t -> exn Tail.Stream.t
val error : Monitor.t -> exn Deferred.t
val extract_exn : exn -> exn
val has_seen_error : Monitor.t -> bool
val send_exn :
Monitor.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)
Monitor.with_optional_monitor_name
val handle_errors :
((unit -> 'a Deferred.t) -> (exn -> unit) -> 'a Deferred.t)
Monitor.with_optional_monitor_name
val catch_stream :
((unit -> unit) -> exn Tail.Stream.t) Monitor.with_optional_monitor_name
val catch :
((unit -> unit) -> exn Deferred.t) Monitor.with_optional_monitor_name
val protect :
((unit -> 'a Deferred.t) ->
finally:(unit -> unit Deferred.t) -> 'a Deferred.t)
Monitor.with_optional_monitor_name
val main : Monitor.t
val kill : Monitor.t -> unit
val is_alive : Monitor.t -> bool
module Exported_for_scheduler :
sig
type 'a with_options = ?monitor:Monitor.t -> ?priority:Priority.t -> 'a
val within' :
((unit -> 'a Deferred.t) -> 'a Deferred.t)
Monitor.Exported_for_scheduler.with_options
val within :
((unit -> unit) -> unit) Monitor.Exported_for_scheduler.with_options
val within_v :
((unit -> 'a) -> 'a option)
Monitor.Exported_for_scheduler.with_options
val schedule' :
((unit -> 'a Deferred.t) -> 'a Deferred.t)
Monitor.Exported_for_scheduler.with_options
val schedule :
((unit -> unit) -> unit) Monitor.Exported_for_scheduler.with_options
val within_context :
Execution_context.t -> (unit -> 'a) -> ('a, unit) Core.Std.Result.t
end
val sexp_of_t : Monitor.t -> Sexplib.Sexp.t
end