Channel Sharding in Go

from blog NULL BITMAP by Justin Jaffray, | ↗ original
It’s a common pattern in Go to fan out I/O-bound tasks to a bunch of worker Goroutines. We have some big batch of work that has to get done, and we dole it out to workers that each do blocking I/O. There are a couple of natural ways to do this, but let's talk about a way not to do it first. I recently was shown a piece of code that implemented...