package async_unix

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Fd = Raw_fd
module Watching = Fd.Watching
module Signal = Core.Signal
module Timerfd = Core.Linux_ext.Timerfd
val debug : bool
module File_descr_watcher : sig ... end
include sig ... end
val preserve_execution_context : ('a -> unit) -> ('a -> unit) Core_kernel.Staged.t
val schedule : ((unit -> unit) -> unit) Async_unix.Import.Kernel_scheduler.with_options
val within : ((unit -> unit) -> unit) Async_unix.Import.Kernel_scheduler.with_options
val within_context : Async_kernel.Execution_context.t -> (unit -> 'a) -> ('a, unit) Core_kernel.Result.t
val within_v : ((unit -> 'a) -> 'a option) Async_unix.Import.Kernel_scheduler.with_options
val find_local : 'a Core_kernel.Univ_map.Key.t -> 'a option
val with_local : 'a Core_kernel.Univ_map.Key.t -> 'a option -> f:(unit -> 'b) -> 'b
val cycle_count : unit -> int
val cycle_start_ns : unit -> Base__.Int63_backends.Dynamic.t
val cycle_start : unit -> Core_kernel.Time.t
val set_max_num_jobs_per_priority_per_cycle : int -> unit
val max_num_jobs_per_priority_per_cycle : unit -> int
val force_current_cycle_to_end : unit -> unit
type t = {
  1. mutex : Core.Nano_mutex.t;
  2. mutable is_running : bool;
  3. mutable have_called_go : bool;
  4. mutable fds_whose_watching_has_changed : Fd.t list;
  5. file_descr_watcher : File_descr_watcher.t;
  6. mutable time_spent_waiting_for_io : Tsc.Span.t;
  7. fd_by_descr : Fd_by_descr.t;
  8. mutable timerfd : Core.Linux_ext.Timerfd.t option;
  9. mutable scheduler_thread_id : int;
  10. interruptor : Interruptor.t;
  11. signal_manager : Raw_signal_manager.t;
  12. thread_pool : Thread_pool.t;
  13. mutable handle_thread_pool_stuck : stuck_for:Core.Time_ns.Span.t -> unit;
  14. busy_pollers : Busy_pollers.t;
  15. mutable busy_poll_thread_is_running : bool;
  16. mutable next_tsc_calibration : Core.Time_stamp_counter.t;
  17. kernel_scheduler : Async_unix.Import.Kernel_scheduler.t;
  18. mutable have_lock_do_cycle : (unit -> unit) option;
  19. mutable max_inter_cycle_timeout : Async_unix.Import.Max_inter_cycle_timeout.t;
  20. mutable min_inter_cycle_timeout : Async_unix.Import.Min_inter_cycle_timeout.t;
}
val min_inter_cycle_timeout : t -> Async_unix.Import.Min_inter_cycle_timeout.t
val set_min_inter_cycle_timeout : t -> Async_unix.Import.Min_inter_cycle_timeout.t -> unit
val max_inter_cycle_timeout : t -> Async_unix.Import.Max_inter_cycle_timeout.t
val set_have_lock_do_cycle : t -> (unit -> unit) option -> unit
val kernel_scheduler : t -> Async_unix.Import.Kernel_scheduler.t
val next_tsc_calibration : t -> Core.Time_stamp_counter.t
val set_next_tsc_calibration : t -> Core.Time_stamp_counter.t -> unit
val busy_poll_thread_is_running : t -> bool
val set_busy_poll_thread_is_running : t -> bool -> unit
val busy_pollers : t -> Busy_pollers.t
val set_handle_thread_pool_stuck : t -> (stuck_for:Core.Time_ns.Span.t -> unit) -> unit
val thread_pool : t -> Thread_pool.t
val signal_manager : t -> Raw_signal_manager.t
val interruptor : t -> Interruptor.t
val scheduler_thread_id : t -> int
val set_scheduler_thread_id : t -> int -> unit
val timerfd : t -> Core.Linux_ext.Timerfd.t option
val set_timerfd : t -> Core.Linux_ext.Timerfd.t option -> unit
val fd_by_descr : t -> Fd_by_descr.t
val time_spent_waiting_for_io : t -> Tsc.Span.t
val set_time_spent_waiting_for_io : t -> Tsc.Span.t -> unit
val file_descr_watcher : t -> File_descr_watcher.t
val fds_whose_watching_has_changed : t -> Fd.t list
val set_fds_whose_watching_has_changed : t -> Fd.t list -> unit
val have_called_go : t -> bool
val set_have_called_go : t -> bool -> unit
val set_is_running : t -> bool -> unit
val mutex : t -> Core.Nano_mutex.t
module Fields : sig ... end
val sexp_of_t : t -> Sexplib.Sexp.t
val max_num_threads : t -> int
val current_execution_context : t -> Async_kernel.Execution_context.t
val with_execution_context : t -> Async_kernel.Execution_context.t -> f:(unit -> 'a) -> 'a
val create_fd : ?avoid_nonblock_if_possible:bool -> t -> Fd.Kind.t -> Fd.File_descr.t -> Core.Info.t -> Fd.t
val lock : t -> unit
val try_lock : t -> bool
val unlock : t -> unit
val with_lock : t -> (unit -> 'a) -> 'a
val am_holding_lock : t -> bool
type the_one_and_only =
  1. | Not_ready_to_initialize
  2. | Ready_to_initialize of unit -> t
  3. | Initialized of t
val mutex_for_initializing_the_one_and_only_ref : Core.Nano_mutex.t
val the_one_and_only_ref : the_one_and_only Core.ref
val is_ready_to_initialize : unit -> bool
val the_one_and_only_uncommon_case : should_lock:bool -> t
val the_one_and_only : should_lock:bool -> t
val current_thread_id : unit -> int
val is_main_thread : unit -> bool
val remove_fd : t -> Raw_fd.t -> unit
val maybe_start_closing_fd : t -> Fd.t -> unit
val dec_num_active_syscalls_fd : t -> Fd.t -> unit
val invariant : t -> unit
val update_check_access : t -> bool -> unit
val try_create_timerfd : unit -> Timerfd.t option
val default_handle_thread_pool_stuck : stuck_for:Core.Time_ns.Span.t -> unit
val detect_stuck_thread_pool : t -> unit
val thread_safe_wakeup_scheduler : t -> unit
val i_am_the_scheduler : t -> bool
val set_fd_desired_watching : t -> Fd.t -> Read_write.Key.t -> Fd.Watching.t -> unit
val request_start_watching : t -> Fd.t -> Read_write.Key.t -> Fd.Watching.t -> [> `Already_closed | `Already_watching | `Unsupported | `Watching ]
val request_stop_watching : t -> Fd.t -> Read_write.Key.t -> Fd.ready_to_result -> unit
val post_check_handle_fd : t -> Async_unix.Import.File_descr.t -> Read_write.Key.t -> Fd.ready_to_result -> unit
val create : ?file_descr_watcher:Async_unix.Config.File_descr_watcher.t -> ?max_num_open_file_descrs:Async_unix.Config.Max_num_open_file_descrs.t -> ?max_num_threads:Async_unix.Config.Max_num_threads.t -> unit -> t
val init : unit -> unit
val reset_in_forked_process : unit -> unit
val thread_safe_reset : unit -> unit
val make_async_unusable : unit -> unit
val thread_safe_enqueue_external_job : t -> Async_kernel.Execution_context.t -> ('a -> unit) -> 'a -> unit
val have_lock_do_cycle : t -> unit
val sync_changed_fds_to_file_descr_watcher : t -> unit
val maybe_calibrate_tsc : t -> unit
val create_job : ?execution_context:Async_kernel.Execution_context.t -> t -> ('a -> unit) -> 'a -> (Async_kernel__.Types.Execution_context.t, Obj.t -> unit, Obj.t) Core_kernel.Pool.Slots.t3 Core_kernel.Pool.Pointer.t
val dump_core_on_job_delay : unit -> unit
val be_the_scheduler : ?raise_unhandled_exn:bool -> t -> 'a
val add_finalizer : t -> 'a Core_kernel.Heap_block.t -> ('a Core_kernel.Heap_block.t -> unit) -> unit
val add_finalizer_exn : t -> 'a -> ('a -> unit) -> unit
val go : ?raise_unhandled_exn:bool -> unit -> Core_kernel.Nothing.t
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_kernel.Nothing.t
val is_running : unit -> bool
val report_long_cycle_times : ?cutoff:Core.Time.Span.t -> unit -> unit
val set_check_invariants : bool -> unit
val set_detect_invalid_access_from_thread : bool -> unit
val set_record_backtraces : bool -> unit
module Expert : sig ... end
val set_max_inter_cycle_timeout : Core_kernel.Core_kernel_private.Time_float0.Span.t -> unit
val start_busy_poller_thread_if_not_running : t -> unit
val add_busy_poller : (unit -> [ `Continue_polling | `Stop_polling of 'a ]) -> 'a Async_unix.Import.Deferred.t
type 'b folder = {
  1. folder : 'a. 'b -> t -> (t, 'a) Core.Field.t -> 'b;
}
val t : unit -> t
val fold_fields : init:'a -> 'a folder -> 'a
val handle_thread_pool_stuck : (stuck_for:Core.Time_ns.Span.t -> unit) -> unit
val yield_until_no_jobs_remain : unit -> unit Async_unix.Import.Kernel_scheduler.Deferred.t
val yield_every : n:int -> (unit -> unit Async_unix.Import.Kernel_scheduler.Deferred.t) Core.Staged.t
val num_jobs_run : unit -> int
OCaml

Innovation. Community. Security.