Generic worker pool 
Go (1.18+) framework to run a pool of N
workers
go get github.com/quakephil/generic-worker-pool@v0.2.2
workers := pool.New[I, O](input, worker, output)
- channel synchronization for
- concurrent runs of
Process()
- completion of
Output()
- concurrent runs of
result := workers.Wait(concurrency)
func input(in chan<- I) {
for ... {
in <- I{ ... }
}
}
func worker(i I) I {
i.update = ...
return i
}
func output(results <-chan I) (out O) {
for result := range results {
out.update += ...
}
return
}
Examples: https://github.com/QuakePhil/generic-worker-pool-examples