Module Require_explicit_time_source.Scheduler

include module type of sig ... end
type t = Async_unix__.Raw_scheduler.t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
type 'a with_options = ?⁠monitor:Async_kernel.Monitor.t -> ?⁠priority:Async_kernel.Priority.t -> 'a
val current_execution_context : unit -> Async_kernel.Execution_context.t
val within_context : Async_kernel.Execution_context.t -> (unit -> 'a) -> ('a, unit) Core_kernel.Result.t
val within' : ((unit -> 'a Async_kernel.Deferred.t) -> 'a Async_kernel.Deferred.t) with_options
val within : ((unit -> unit) -> unit) with_options
val within_v : ((unit -> 'a) -> 'a option) with_options
val with_local : 'a Core_kernel.Univ_map.Key.t -> 'a option -> f:(unit -> 'b) -> 'b
val find_local : 'a Core_kernel.Univ_map.Key.t -> 'a option
val schedule' : ((unit -> 'a Async_kernel.Deferred.t) -> 'a Async_kernel.Deferred.t) with_options
val schedule : ((unit -> unit) -> unit) with_options
val enqueue_job : Async_kernel.Execution_context.t -> ('a -> unit) -> 'a -> unit
val thread_safe_enqueue_job : Async_kernel.Execution_context.t -> ('a -> unit) -> 'a -> unit
val preserve_execution_context : ('a -> unit) -> ('a -> unit) Core_kernel.Staged.t
val preserve_execution_context' : ('a -> 'b Async_kernel.Deferred.t) -> ('a -> 'b Async_kernel.Deferred.t) Core_kernel.Staged.t
val cycle_start : unit -> Core_kernel.Time.t
val cycle_start_ns : unit -> Async_kernel__.Import.Time_ns.t
val cycle_times : unit -> Core_kernel.Time.Span.t Async_kernel__.Async_stream.t
val cycle_times_ns : unit -> Async_kernel__.Import.Time_ns.Span.t Async_kernel__.Async_stream.t
val long_cycles : at_least:Async_kernel__.Import.Time_ns.Span.t -> Async_kernel__.Import.Time_ns.Span.t Async_kernel__.Async_stream.t
val cycle_count : unit -> int
val total_cycle_time : unit -> Async_kernel__.Import.Time_ns.Span.t
val event_precision : unit -> Core_kernel.Time.Span.t
val event_precision_ns : unit -> Async_kernel__.Import.Time_ns.Span.t
val force_current_cycle_to_end : unit -> unit
val set_max_num_jobs_per_priority_per_cycle : int -> unit
val max_num_jobs_per_priority_per_cycle : unit -> int
val set_record_backtraces : bool -> unit
val yield : unit -> unit Async_kernel.Deferred.t
val yield_until_no_jobs_remain : unit -> unit Async_kernel.Deferred.t
val yield_every : n:int -> (unit -> unit Async_kernel.Deferred.t) Core_kernel.Staged.t
val num_jobs_run : unit -> int
val num_pending_jobs : unit -> int
module Private = Async_kernel__.Scheduler
val t : unit -> t
val max_num_open_file_descrs : unit -> int
val max_num_threads : unit -> int
val go : ?⁠raise_unhandled_exn:bool -> unit -> Core.never_returns
val go_main : ?⁠raise_unhandled_exn:bool -> ?⁠file_descr_watcher:Async_unix__.Config.File_descr_watcher.t -> ?⁠max_num_open_file_descrs:int -> ?⁠max_num_threads:int -> main:(unit -> unit) -> unit -> Core.never_returns
val report_long_cycle_times : ?⁠cutoff:Core.Time.Span.t -> unit -> unit
val is_running : unit -> bool
val set_max_inter_cycle_timeout : Core.Time.Span.t -> unit
val set_check_invariants : bool -> unit
val set_detect_invalid_access_from_thread : bool -> unit
type 'b folder = 'b Async_unix__Scheduler.folder = {
folder : a. 'b -> t -> (t'a) Core.Field.t -> 'b;
}
val fold_fields : init:'b -> 'b folder -> 'b
val is_ready_to_initialize : unit -> bool
val reset_in_forked_process : unit -> unit
val make_async_unusable : unit -> unit
val add_busy_poller : (unit -> [ `Continue_polling | `Stop_polling of 'a ]) -> 'a Async_unix__.Import.Deferred.t
val handle_thread_pool_stuck : (stuck_for:Core.Time_ns.Span.t -> unit) -> unit
val default_handle_thread_pool_stuck : Thread_pool.t -> stuck_for:Core.Time_ns.Span.t -> unit
val time_spent_waiting_for_io : unit -> Core.Time_ns.Span.t
val set_min_inter_cycle_timeout : Core.Time_ns.Span.t -> unit
val cycle_start : unit -> Time.t