Registry / utility / nozzle-throttler

nozzle-throttler

JSON →
library0.0.0-20180817012639-2ea982251481gogounverified

Package throttler provides a concurrency limiter similar to sync.WaitGroup but with a maximum number of simultaneously running goroutines.

go get github.com/nozzle/throttler
INSTALL
IMPORT
SIG · NOZZLE-THROTTLER
N
nozzle-throttler
utilitygov0.0.0-20180817012639-2ea982251481
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

throttler
github.com/nozzle/throttler

Throttle goroutines to a maximum of 10 concurrent workers

package main import ( "github.com/nozzle/throttler" ) func main() { t := throttler.New(10, 100) for i := 0; i < 100; i++ { go func(id int) { defer t.Done(nil) // do work }(i) t.Throttle() } t.Err() }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20180817012639-2ea982251481latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
nozzle-throttler — go get nozzle-throttler · libregistry