package async_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val events : {t}7 -> Async_kernel__Types.Job_or_event.t Timing_wheel.t
val set_execution_context : {t}7 -> Async_kernel__Types.Execution_context.t -> unit
module Synchronous_time_source : sig ... end
module Event : sig ... end
module Alarm = Timing_wheel.Alarm
module Job_or_event : sig ... end
val debug : bool
module Ivar : sig ... end
module Bvar : sig ... end
module Very_low_priority_worker : sig ... end
type t = {
  1. mutable check_access : (unit -> unit) option;
  2. mutable job_pool : (Execution_context.t, Obj.t -> unit, Obj.t) Tuple_pool.Slots.t3 Tuple_pool.t;
  3. normal_priority_jobs : Async_kernel__.Types.Job_queue.t;
  4. low_priority_jobs : Async_kernel__.Types.Job_queue.t;
  5. very_low_priority_workers : Very_low_priority_worker.t Core_kernel.Deque.t;
  6. mutable main_execution_context : Execution_context.t;
  7. mutable current_execution_context : Execution_context.t;
  8. mutable uncaught_exn : (Core_kernel.Exn.t * Core_kernel.Sexp.t) option;
  9. mutable cycle_count : int;
  10. mutable cycle_start : Core_kernel.Time_ns.t;
  11. mutable in_cycle : bool;
  12. mutable run_every_cycle_start : (unit -> unit) list;
  13. mutable run_every_cycle_end : (unit -> unit) list;
  14. mutable last_cycle_time : Core_kernel.Core_kernel_private.Time_ns_alternate_sexp.Span.t;
  15. mutable last_cycle_num_jobs : int;
  16. mutable total_cycle_time : Core_kernel.Core_kernel_private.Time_ns_alternate_sexp.Span.t;
  17. mutable time_source : Core_kernel.read_write Synchronous_time_source.T1.t;
  18. external_jobs : Async_kernel__.Types.External_job.t Thread_safe_queue.t;
  19. mutable thread_safe_external_job_hook : unit -> unit;
  20. mutable job_queued_hook : (Priority.t -> unit) option;
  21. mutable event_added_hook : (Core_kernel.Time_ns.t -> unit) option;
  22. mutable yield : (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t;
  23. mutable yield_until_no_jobs_remain : (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t;
  24. mutable check_invariants : bool;
  25. mutable max_num_jobs_per_priority_per_cycle : Async_kernel_config.Max_num_jobs_per_priority_per_cycle.t;
  26. mutable record_backtraces : bool;
  27. mutable on_start_of_cycle : unit -> unit;
  28. 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_config.Max_num_jobs_per_priority_per_cycle.t
val set_max_num_jobs_per_priority_per_cycle : t -> Async_kernel_config.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
val set_yield_until_no_jobs_remain : t -> (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t -> unit
val yield : t -> (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t
val set_yield : t -> (unit, Core_kernel.read_write) Async_kernel__.Types.Bvar.t -> unit
val event_added_hook : t -> (Core_kernel.Time_ns.t -> unit) option
val set_event_added_hook : t -> (Core_kernel.Time_ns.t -> unit) option -> unit
val job_queued_hook : t -> (Priority.t -> unit) option
val set_job_queued_hook : t -> (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__.Types.External_job.t Thread_safe_queue.t
val set_time_source : t -> Core_kernel.read_write Synchronous_time_source.T1.t -> unit
val set_last_cycle_num_jobs : t -> int -> unit
val run_every_cycle_end : t -> (unit -> unit) list
val set_run_every_cycle_end : t -> (unit -> unit) list -> unit
val run_every_cycle_start : t -> (unit -> unit) list
val set_run_every_cycle_start : t -> (unit -> unit) list -> unit
val in_cycle : t -> bool
val set_in_cycle : t -> bool -> unit
val cycle_start : t -> Core_kernel.Time_ns.t
val set_cycle_start : t -> Core_kernel.Time_ns.t -> unit
val cycle_count : t -> int
val set_cycle_count : t -> int -> unit
val set_uncaught_exn : t -> (Core_kernel.Exn.t * Core_kernel.Sexp.t) option -> unit
val set_current_execution_context : t -> Execution_context.t -> unit
val main_execution_context : t -> Execution_context.t
val set_main_execution_context : t -> 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__.Types.Job_queue.t
val normal_priority_jobs : t -> Async_kernel__.Types.Job_queue.t
val set_job_pool : t -> (Execution_context.t, Obj.t -> unit, Obj.t) Tuple_pool.Slots.t3 Tuple_pool.t -> unit
module Fields : sig ... end
val sexp_of_t : t -> Ppx_sexp_conv_lib.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 last_cycle_num_jobs : t -> int
val invariant : t -> unit
val enqueue : t -> Execution_context.t -> ('a -> unit) -> 'a -> unit
val enqueue_job : t -> (Execution_context.t * (Obj.t -> unit) * Obj.t, [ `S0 of Execution_context.t | `S1 of Obj.t -> unit | `S2 of Obj.t ]) Tuple_pool.Slots.t Tuple_pool.Pointer.t -> free_job:bool -> unit
val handle_fired : 'a Synchronous_time_source.T1.t -> Async_kernel__.Types.Job_or_event.t -> 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 -> Execution_context.t
val with_execution_context : t -> Async_kernel__Types.Execution_context.t -> f:(unit -> 'a) -> 'a
val create_job : t -> Execution_context.t -> ('a -> unit) -> 'a -> (Execution_context.t, Obj.t -> unit, Obj.t) Tuple_pool.Slots.t3 Tuple_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_config.Max_num_jobs_per_priority_per_cycle.t -> unit
val run_jobs : t -> (unit, exn * Core_kernel.Backtrace.t) Core_kernel._result
val stabilize : t -> (unit, exn) Core_kernel._result
val create_time_source : ?timing_wheel_config:Timing_wheel.Config.t -> now:Core_kernel.Time_ns.t -> unit -> 'a Synchronous_time_source.T1.t
val wall_clock : unit -> Synchronous_time_source.t
OCaml

Innovation. Community. Security.