Up

module Adjustable_throttle

: sig
#
type t

A throttle with adjustable max_concurrent_jobs.

#
val create : max_concurrent_jobs:int -> t
#
val is_dead : t -> bool
#
val enqueue : t -> (unit -> unit Async.Std.Deferred.t) -> unit

Raises exception if the throttle is dead.

#
val set_max_concurrent_jobs : t -> int -> unit
#
val kill_and_flush : t -> unit Async.Std.Deferred.t

Make throttle dead and wait for all currently running jobs to finish.

end