`include module type of Async_kernel__.Scheduler0 with type Scheduler0.t := Async_kernel__.Scheduler0.t`
`include Async_kernel__.Types.Scheduler`
`type t````=` `{`

`mutable check_access : (unit ‑> unit) option;`
`mutable job_pool : Async_kernel__.Types.Job_pool.t;`
`normal_priority_jobs : Async_kernel__.Types.Job_queue.t;`
`low_priority_jobs : Async_kernel__.Types.Job_queue.t;`
`very_low_priority_workers : Async_kernel__.Types.Very_low_priority_worker.t Core_kernel.Deque.t;`
`mutable main_execution_context : Async_kernel__.Types.Execution_context.t;`
`mutable current_execution_context : Async_kernel__.Types.Execution_context.t;`
`mutable uncaught_exn : (Core_kernel.Exn.t * Core_kernel.Sexp.t) option;`
`mutable cycle_count : int;`
`mutable cycle_start : Async_kernel__.Import.Time_ns.t;`
`mutable run_every_cycle_start : (unit ‑> unit) list;`
`mutable last_cycle_time : Async_kernel__.Import.Time_ns.Span.t;`
`mutable last_cycle_num_jobs : int;`
`mutable time_source : Core_kernel.read_write Async_kernel__.Types.Time_source.t1;`
`external_jobs : Async_kernel__.Types.External_job.t Core_kernel.Thread_safe_queue.t;`
`mutable thread_safe_external_job_hook : unit ‑> unit;`
`mutable job_queued_hook : (Async_kernel.Priority.t ‑> unit) option;`
`mutable event_added_hook : (Async_kernel__.Import.Time_ns.t ‑> unit) option;`
`mutable yield : (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t;`
`mutable yield_until_no_jobs_remain : (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t;`
`mutable check_invariants : bool;`
`mutable max_num_jobs_per_priority_per_cycle : Async_kernel__.Import.Max_num_jobs_per_priority_per_cycle.t;`
`mutable record_backtraces : bool;`
`mutable on_start_of_cycle : unit ‑> unit;`
`mutable on_end_of_cycle : unit ‑> unit;`

`}```
`val events : t ‑> Async_kernel__Types.Job_or_event.t Core_kernel.Timing_wheel_ns.t`
`val set_execution_context : t ‑> Async_kernel__Types.Execution_context.t ‑> unit`
`module Synchronous_time_source = Async_kernel__.Synchronous_time_source0`
`module Event = Synchronous_time_source.Event`
`module Alarm = Core_kernel.Timing_wheel_ns.Alarm`
`module Job_or_event = Synchronous_time_source.T1.Job_or_event`
`val debug : bool`
`module Ivar : sig ... end`
`module Bvar : sig ... end`
`module Very_low_priority_worker : sig ... end`
`type t``= Async_kernel__.Scheduler0.t``=` `{`

`mutable check_access : (unit ‑> unit) option;`
`mutable job_pool : Async_kernel__.Job_pool.t;`
`normal_priority_jobs : Async_kernel__.Job_queue.t;`
`low_priority_jobs : Async_kernel__.Job_queue.t;`
`very_low_priority_workers : Very_low_priority_worker.t Core_kernel.Deque.t;`
`mutable main_execution_context : Async_kernel.Execution_context.t;`
`mutable current_execution_context : Async_kernel.Execution_context.t;`
`mutable uncaught_exn : (Core_kernel.Exn.t * Core_kernel.Sexp.t) option;`
`mutable cycle_count : int;`
`mutable cycle_start : Async_kernel__.Import.Time_ns.t;`
`mutable run_every_cycle_start : (unit ‑> unit) list;`
`mutable last_cycle_time : Async_kernel__.Import.Time_ns.Span.t;`
`mutable last_cycle_num_jobs : int;`
`mutable time_source : Core_kernel.read_write Synchronous_time_source.T1.t;`
`external_jobs : Async_kernel__.External_job.t Core_kernel.Thread_safe_queue.t;`
`mutable thread_safe_external_job_hook : unit ‑> unit;`
`mutable job_queued_hook : (Async_kernel.Priority.t ‑> unit) option;`
`mutable event_added_hook : (Async_kernel__.Import.Time_ns.t ‑> unit) option;`
`mutable yield : (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t Core_kernel.sexp_opaque;`
`mutable yield_until_no_jobs_remain : (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t Core_kernel.sexp_opaque;`
`mutable check_invariants : bool;`
`mutable max_num_jobs_per_priority_per_cycle : Async_kernel__.Import.Max_num_jobs_per_priority_per_cycle.t;`
`mutable record_backtraces : bool;`
`mutable on_start_of_cycle : unit ‑> unit;`
`mutable on_end_of_cycle : unit ‑> unit;`

`}```
`val on_end_of_cycle : t ‑> unit ‑> unit`
`val set_on_end_of_cycle : t ‑> (unit ‑> unit) ‑> unit`
`val on_start_of_cycle : t ‑> unit ‑> unit`
`val set_on_start_of_cycle : t ‑> (unit ‑> unit) ‑> unit`
`val record_backtraces : t ‑> bool`
`val set_record_backtraces : t ‑> bool ‑> unit`
`val max_num_jobs_per_priority_per_cycle : t ‑> Async_kernel__.Import.Max_num_jobs_per_priority_per_cycle.t`
`val set_max_num_jobs_per_priority_per_cycle : t ‑> Async_kernel__.Import.Max_num_jobs_per_priority_per_cycle.t ‑> unit`
`val check_invariants : t ‑> bool`
`val set_check_invariants : t ‑> bool ‑> unit`
`val yield_until_no_jobs_remain : t ‑> (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t Core_kernel.sexp_opaque`
`val set_yield_until_no_jobs_remain : t ‑> (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t Core_kernel.sexp_opaque ‑> unit`
`val yield : t ‑> (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t Core_kernel.sexp_opaque`
`val set_yield : t ‑> (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t Core_kernel.sexp_opaque ‑> unit`
`val event_added_hook : t ‑> (Async_kernel__.Import.Time_ns.t ‑> unit) option`
`val set_event_added_hook : t ‑> (Async_kernel__.Import.Time_ns.t ‑> unit) option ‑> unit`
`val job_queued_hook : t ‑> (Async_kernel.Priority.t ‑> unit) option`
`val set_job_queued_hook : t ‑> (Async_kernel.Priority.t ‑> unit) option ‑> unit`
`val thread_safe_external_job_hook : t ‑> unit ‑> unit`
`val set_thread_safe_external_job_hook : t ‑> (unit ‑> unit) ‑> unit`
`val external_jobs : t ‑> Async_kernel__.External_job.t Core_kernel.Thread_safe_queue.t`
`val time_source : t ‑> Core_kernel.read_write Synchronous_time_source.T1.t`
`val set_time_source : t ‑> Core_kernel.read_write Synchronous_time_source.T1.t ‑> unit`
`val last_cycle_num_jobs : t ‑> int`
`val set_last_cycle_num_jobs : t ‑> int ‑> unit`
`val last_cycle_time : t ‑> Async_kernel__.Import.Time_ns.Span.t`
`val set_last_cycle_time : t ‑> Async_kernel__.Import.Time_ns.Span.t ‑> unit`
`val run_every_cycle_start : t ‑> (unit ‑> unit) list`
`val set_run_every_cycle_start : t ‑> (unit ‑> unit) list ‑> unit`
`val cycle_start : t ‑> Async_kernel__.Import.Time_ns.t`
`val set_cycle_start : t ‑> Async_kernel__.Import.Time_ns.t ‑> unit`
`val cycle_count : t ‑> int`
`val set_cycle_count : t ‑> int ‑> unit`
`val uncaught_exn : t ‑> (Core_kernel.Exn.t * Core_kernel.Sexp.t) option`
`val set_uncaught_exn : t ‑> (Core_kernel.Exn.t * Core_kernel.Sexp.t) option ‑> unit`
`val current_execution_context : t ‑> Async_kernel.Execution_context.t`
`val set_current_execution_context : t ‑> Async_kernel.Execution_context.t ‑> unit`
`val main_execution_context : t ‑> Async_kernel.Execution_context.t`
`val set_main_execution_context : t ‑> Async_kernel.Execution_context.t ‑> unit`
`val very_low_priority_workers : t ‑> Very_low_priority_worker.t Core_kernel.Deque.t`
`val low_priority_jobs : t ‑> Async_kernel__.Job_queue.t`
`val normal_priority_jobs : t ‑> Async_kernel__.Job_queue.t`
`val job_pool : t ‑> Async_kernel__.Job_pool.t`
`val set_job_pool : t ‑> Async_kernel__.Job_pool.t ‑> unit`
`val check_access : t ‑> (unit ‑> unit) option`
`val set_check_access : t ‑> (unit ‑> unit) option ‑> unit`
`module Fields : sig ... end`
`val sexp_of_t : t ‑> Base.Sexp.t`
`val uncaught_exn_unwrapped : t ‑> (Core_kernel.Exn.t * Core_kernel.Sexp.t) option`
`val uncaught_exn : t ‑> Core_kernel.Error.t option`
`val num_pending_jobs : t ‑> int`
`val num_jobs_run : t ‑> int`
`val invariant : t ‑> unit`
`val free_job : t ‑> Async_kernel__.Job_pool.slots Core_kernel.Pool.Pointer.t ‑> Core_kernel__.Import.unit`
`val enqueue : t ‑> Async_kernel.Execution_context.t ‑> ('a ‑> unit) ‑> 'a ‑> unit`
`val enqueue_job : t ‑> (Async_kernel.Execution_context.t * (Obj.t ‑> unit) * Obj.t, [ `S0 of Async_kernel.Execution_context.t | `S1 of Obj.t ‑> unit | `S2 of Obj.t ]) Core_kernel.Pool.Slots.t Core_kernel.Pool.Pointer.t ‑> free_job:bool ‑> Core_kernel__.Import.unit`
`val handle_fired : 'a Synchronous_time_source.T1.t ‑> Async_kernel__Job_or_event.t ‑> Core_kernel__.Import.unit`
`val create : unit ‑> t`
`val is_dead : t ‑> bool`
`val set_check_access : t ‑> (unit ‑> unit) option ‑> unit`
`val t_ref : t Core_kernel.ref`
`val check_access : t ‑> unit`
`val t : unit ‑> t`
`val current_execution_context : t ‑> Async_kernel.Execution_context.t`
`val with_execution_context : t ‑> Async_kernel__Types.Execution_context.t ‑> f:(unit ‑> 'a) ‑> 'a`
`val create_job : t ‑> Async_kernel.Execution_context.t ‑> ('a ‑> unit) ‑> 'a ‑> (Async_kernel.Execution_context.t, Obj.t ‑> unit, Obj.t) Core_kernel.Pool.Slots.t3 Core_kernel.Pool.Pointer.t`
`val got_uncaught_exn : t ‑> Core_kernel.Exn.t ‑> Core_kernel.Sexp.t ‑> unit`
`val start_cycle : t ‑> max_num_jobs_per_priority:Async_kernel__.Import.Max_num_jobs_per_priority_per_cycle.t ‑> unit`

`start_cycle t ~max_num_jobs_per_priority` enables subsequent calls of `run_jobs` to run up to `max_num_jobs_per_priority` jobs of each priority level.

`val run_jobs : t ‑> (unit, exn * Core_kernel.Backtrace.t) Core_kernel._result`

`run_jobs t` removes jobs from `t` one at a time and runs them, stopping as soon as an unhandled exception is raised, or when no more jobs can be run at any priority, as per `~max_num_jobs_per_priority`.

`val stabilize : t ‑> (unit, exn) Core_kernel._result`
`val create_time_source : ?⁠timing_wheel_config:Core_kernel.Timing_wheel_ns.Config.t ‑> now:Core_kernel.Timing_wheel_ns.Time.t ‑> unit ‑> 'a Synchronous_time_source.T1.t`
`val wall_clock : unit ‑> Synchronous_time_source.t`