package core_kernel

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

Module Limiter.ThrottleSource

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.

Sourcetype t = private limiter
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval create_exn : now:Core.Time_ns.t -> max_concurrent_jobs:int -> t
Sourceval try_start_job : t -> now:Core.Time_ns.t -> [ `Start | `Max_concurrent_jobs_running ]
Sourceval finish_job : t -> now:Core.Time_ns.t -> unit
OCaml

Innovation. Community. Security.