github.com/cilium/workerpool
Package workerpool implements a concurrency limiting worker pool. Worker routines are spawned on demand as tasks are submitted; up to the configured limit of concurrent workers. When the limit of concurrently running workers is reached, submitting a task blocks until a worker is able to pick it up. This behavior is intentional as it prevents from accumulating tasks which could grow unbounded. Therefore, it is the responsibility of the caller to queue up tasks if that's the intended behavior. One caveat is that while the number of concurrently running workers is limited, task results are not and they accumulate until they are collected. Therefore, if a large number of tasks can be expected, the workerpool should be periodically drained (e.g. every 10k tasks).
proxy.golang.org
v1.4.0
11 days ago
8
23
131
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/cilium/workerpool
spec |
| License | Apache-2.0 |
| Namespace | github.com/cilium |
| First Release | about 5 years ago |
| Last Synced | 10 days ago |
Repository
| Stars | 17 on GitHub |
| Forks | 6 on GitHub |
| Docker Dependents | 44 |
| Docker Downloads | 121,000,321 |