package core_kernel

  1. Overview
  2. Docs
Industrial strength alternative to OCaml's standard library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

core_kernel-v0.15.0.tar.gz
sha256=34a0288f16027c6b90e4ad16cb5cc677d7063d310faf918748ce70f1745116c0

doc/core_kernel.limiter/Limiter/Throttle/index.html

Module 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 sexp_of_t : t -> Sexplib0.Sexp.t
val create_exn : now:Core.Time_ns.t -> max_concurrent_jobs:int -> t
val try_start_job : t -> now:Core.Time_ns.t -> [ `Start | `Max_concurrent_jobs_running ]
val finish_job : t -> now:Core.Time_ns.t -> unit