lsp.fiber
Fiber.Throttle
Limit the number of jobs
lsp
lsp.fiber_unix
lsp.stdune
type t
val create : int -> t
create n creates a throttler that allows to run n jobs at once
create n
n
val size : t -> int
How many jobs can run at the same time
val resize : t -> int -> unit t
Change the number of jobs that can run at once
val run : t -> f:(unit -> 'a t) -> 'a t
Execute a fiber, waiting if too many jobs are already running
val running : t -> int
Return the number of jobs currently running