Hacker News new | past | comments | ask | show | jobs | submit login

Why having a 1000s buffered channel is useful in this case? If it's unbuffered, you still get the backpressure blocking on writers as a feature, since you have a worker queues of thousands of goroutines to read and handle them.



That's a good point, at steady-state, I'd imagine unbuffered channels would have the same throughput as a deeply buffered channels. The main advantage is being able to spool up faster and smooth out throughput, but it could be for most workloads that is not valuable enough. Perhaps I placed too much value on that.

Your comment (and others) have convinced me to do some more empirical testing and see how necessary buffered channels are for my goal.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: