Forest Logo
search
package_2

throat

By @roblox

Roblox

Mirrored

throat

Upstream: https://github.com/ForbesLindesay/throat/tree/6.0.1

Concurrency limiter for Promise-returning functions. Throttles parallel execution to at most n concurrent calls. Used by jest-runner and jest-circus to limit test concurrency.

API

local throat = require(Packages.Throat)

-- Late-bound: returns a throttled wrapper, pass the function on each call
local throttle = throat(n)
throttle(fn, arg1, arg2)

-- Early-bound: bind the function upfront
local throttledFn = throat(n, fn)
throttledFn(arg1, arg2)

Package Details

Install command (Click to copy)


Version

3.20.0

License

MIT

check_circle

Safe for commercial use

infoThe package archive does not include its license text; the license is declared in its manifest metadata.

Automated license review — not legal advice.