Go Concurrency Questions From Real Loops
A 4-question reference set on Go concurrency patterns that appear in nearly every backend Go interview: worker pools, select with context, non-reentrant mutexes, and the errgroup fan-out pattern.
Question Bundle
Go
go-concurrency-patterns
go-channels
go-context
interview-prep
By CodeSnatch
January 19, 2026
·
Updated August 14, 2026
210 views
7
4.3 (10)
A common Go interview question: send 1000 work items to a worker pool of 5 goroutines and collect all results. What is the idiomatic pattern, and where do candidates leak goroutines?
Examples
Example 1:
Input: 1000 jobs, 5 workers; channel buffered to 10
Output: All 1000 jobs processed; goroutines exit cleanly when input channel closes
Explanation: Range-over-channel exits when the channel is closed and drained.Example 2:
Input: Same code but caller forgets to close the input channel after sending the last job
Output: Workers block forever on receive; goroutines leak
Explanation: range on a never-closed channel never terminates; the sender owns the close.3 more questions and all solutions are locked.
Purchase this item to access all questions, code snippets, and solutions.
