Limiter.ThrottleImplements a basic throttle. Users of the throttle must successfully call start_job before beginning work and must call finish_job once, and only once, when a job is completed.
type t = private limiterval sexp_of_t : t -> Sexplib0.Sexp.tval create_exn : now:Core.Time_ns.t -> max_concurrent_jobs:int -> tval try_start_job :
t ->
now:Core.Time_ns.t ->
[ `Start | `Max_concurrent_jobs_running ]val finish_job : t -> now:Core.Time_ns.t -> unit