On Sun, Sep 29, 2019 at 2:04 PM Joe McGuckin <mcguc...@gmail.com> wrote:

> If i have multiple goroutines listening on the same channel, then write
> something to the channel, will all goroutines receive the value, or only
> the ‘next’ available goroutine (as determined by the scheduler)
>

Channels are queues: https://golang.org/ref/spec#Channel_types. They *do
not* have fan-out semantics. Only one goroutine reading the channel will
receive the next value.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD9OBwFPgPgsAs8eP%2B6GRrH5bJpup0N2oRPfTBsAYQinpQ%40mail.gmail.com.

Reply via email to