Module Limiter_async.Sequencer
A sequencer is a throttle that is specialized to only allow one job at a time and to, by default, not continue on error.
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
type _ u= t
val create : ?continue_on_error:bool -> ?burst_size:int -> ?sustained_rate_per_sec:float -> unit -> tval enqueue_exn : t -> ?allow_immediate_run:bool -> ('a -> unit) -> 'a -> unitval enqueue' : t -> ('a -> 'b Async_kernel.Deferred.t) -> 'a -> 'b Outcome.t Async_kernel.Deferred.tval num_jobs_waiting_to_start : t -> int
include Common with type 'a t := 'a u
val kill : _ t -> unitkills
t, which aborts all enqueued jobs that haven't started and all jobs enqueued in the future. Ifthas already been killed, then callingkill thas no effect. Note that kill does not affect currently running jobs in any way.
val is_dead : _ t -> boolis_dead treturnstrueiftwas killed, either bykillor by an unhandled exception in a job.