package async_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A sequencer is a throttle that is specialized to only allow one job at a time and to, by default, not continue on error.

A sequencer is a throttle that is specialized to only allow one job at a time and to, by default, not continue on error.

type t
include sig ... end
val sexp_of_t : t -> Sexplib.Sexp.t
val create : ?continue_on_error:bool -> ?burst_size:int -> ?sustained_rate_per_sec:float -> unit -> t
val enqueue_exn : t -> ?allow_immediate_run:bool -> ('a -> unit) -> 'a -> unit
val enqueue' : t -> ('a -> 'b Deferred.t) -> 'a -> 'b Limiter.Outcome.t Deferred.t
val num_jobs_waiting_to_start : t -> int
type 'a u = t

Include Common, with the hack to remove the type parameter

include Limiter.Common with type 'a t := 'a u
val kill : _ u -> unit

kills t, which aborts all enqueued jobs that haven't started and all jobs enqueued in the future. If t has already been killed, then calling kill t has no effect. Note that kill does not effect currently running jobs in any way.

val is_dead : _ u -> bool

is_dead t returns true if t was killed, either by kill or by an unhandled exception in a job.

val to_limiter : _ u -> Limiter.limiter

Convert to a limiter

OCaml

Innovation. Community. Security.