3 ms·
> The next thing on that list is a high performance concurrent queue. That's called a channel in Go.
by _ak 11y ago
> The next thing on that list is a high performance concurrent queue.
That's called a channel in Go.
- kasey_junk 11y agoA channel is a simple abstraction around a giant mutex. It does not scale throughput very well and has terrible latency performance to boot. Something like the disruptor (https://lmax-exchange.github.io/disruptor/ https://lmax-exchange.github.io/disruptor/) is more along the lines of what I was thinking of. Without generics support you have to write it over and over again for each use case.
- chrisseaton 11y agoA go channels implemented using a mutex? I would be surprised if that was the case (but it might be). I would imagine such a fundamental construct built into the language would be lock-free.
- kasey_junk 11y agohttps://golang.org/src/runtime/chan.go https://golang.org/src/runtime/chan.go Lines 28, 152, 401
- chrisseaton 11y agoI stand corrected. I guess it must have some more complex functionality that I thought, needing a lock.
- kasey_junk 11y agoThat is the charitable way to interpret it.