Module Core_kernel__.Limiter.Throttle

Implements 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 limiter
val create_exn : now:Core_kernel.Time_ns.t ‑> max_concurrent_jobs:Core_kernel__.Import.int ‑> t
val try_start_job : t ‑> now:Core_kernel.Time_ns.t ‑> [ `Start | `Max_concurrent_jobs_running ]
val finish_job : t ‑> now:Core_kernel.Time_ns.t ‑> Core_kernel__.Import.unit