---
title: "Discussion on \"Go Cheatsheet - Worker pool pattern\" | Hashnode"
description: "Discussion on \"Go Cheatsheet - Worker pool pattern\". We can use channels to easily simulate a worker pool:\npackage main\n\nimport (\n    \"fmt\"\n    \"time\"\n)\n\nfunc main() {\n    numWorkers := 5\n    numJobs := 100\n\n    // make sure these 2 channels have buffer size of numJobs\n    jobChan := make(chan int, num..."
url: "https://hashnode.com/posts/go-cheatsheet-worker-pool-pattern/613a41f757537d179c9150dd"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Go Cheatsheet - Worker pool pattern](https://hn.0xbf.me/go-cheatsheet-worker-pool-pattern?utm_source=hashnode&utm_medium=feed)

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...

Sep 9, 2021 · 1 min read · hn.0xbf.me  
Read the article

-   [#go](https://hashnode.com/tag/go)

## Written by

[0xBF](https://hashnode.com/@0xbf)

@0xbf

  
[View profile](https://hashnode.com/@0xbf)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
