package async_kernel

  1. Overview
  2. Docs
Module type
Class type

Settings that globally affect the behavior of Async.

These can be set by setting an environment variable, ASYNC_CONFIG, to a sexp representation of the config. Also, setting ASYNC_CONFIG to an invalid sexp (e.g. the empty string), will cause your program to print to stderr a usage message describing how to configure ASYNC_CONFIG, and exit nonzero. For example, the following shell command should print the usage message:

      ASYNC_CONFIG= foo.exe
module Max_num_threads : Core_kernel.Validated.S with type raw := int
module Max_num_open_file_descrs : sig ... end
module Dump_core_on_job_delay : sig ... end
type t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val t : t
val environment_variable : string
module Print_debug_messages_for : sig ... end
module File_descr_watcher : sig ... end
val abort_after_thread_pool_stuck_for : Core_kernel.Time_ns.Span.t

Documentation on these is in strings in, so it can be output in the help message.

val check_invariants : bool
val detect_invalid_access_from_thread : bool
val dump_core_on_job_delay : Dump_core_on_job_delay.t
val thread_pool_cpu_affinity : Thread_pool_cpu_affinity.t
val epoll_max_ready_events : Epoll_max_ready_events.t
val file_descr_watcher : File_descr_watcher.t
val max_inter_cycle_timeout : Max_inter_cycle_timeout.t
val max_num_jobs_per_priority_per_cycle : Max_num_jobs_per_priority_per_cycle.t
val max_num_open_file_descrs : Max_num_open_file_descrs.t
val max_num_threads : Max_num_threads.t
val min_inter_cycle_timeout : Min_inter_cycle_timeout.t
val record_backtraces : bool
val report_thread_pool_stuck_for : Core_kernel.Time_ns.Span.t
val timing_wheel_config : Core_kernel.Timing_wheel_ns.Config.t
val default_timing_wheel_config_for_word_size : Core_kernel.Word_size.t -> Core_kernel.Timing_wheel_ns.Config.t
val task_id : (unit -> Core_kernel.Sexp.t) Core_kernel.ref

!task_id is used in debug messages. It is is set in Async_unix to include the thread and pid.