In this example we’ll look at how to implement a worker pool using goroutines and channels. Here’s the worker, of which we’ll run several concurrent instances. These workers will receive work on the jobs channel and send the corresponding results on results. We’ll sleep a second per job to simulate an expensive task. func worker(id int, jobs <-chan int, results chan<- int) { for j := range jobs {