Go Cheatsheet - Worker pool pattern
We can use channels to easily simulate a worker pool:
package main
import (
"fmt"
"time"
)
func main() {
numWorkers := 5
numJobs := 100
// make sure these 2 channels have buffer size of numJobs
jobChan := make(chan int, num...
hn.0xbf.me1 min read