package async_kernel

  1. Overview
  2. Docs
Module type
Class type

A job's priority determines when in an async cycle the job is run. A "cycle" runs a bounded number of Normal priority jobs followed by a bounded number of Low priority jobs. The bound is Async_kernel_config.max_num_jobs_per_priority_per_cycle.

The primary consequence and use case of Low priority is to improve batching in jobs that flush buffers filled by other, Normal priority jobs.

Neither priority can starve out the other entirely. If there are more Normal priority jobs than can run in a single cycle, then the rest will be delayed until after (some) Low priority jobs run.

type t =
  1. | Normal
  2. | Low
val sexp_of_t : t -> Sexplib0.Sexp.t
include Ppx_enumerate_lib.Enumerable.S with type t := t
val all : t list
val normal : t
val low : t

Innovation. Community. Security.