On Mon, 3 May 2021 at 20:24, Øyvind Teig <oyvind.t...@teigfam.net> wrote:

> I see that, which is great. But I still don't understand why
> https://go2goplay.golang.org/p/S_5WFkpqMP_H (By *rog*, 29Apr2021
> 23:52:05) seems not to print "Client 2".
>

That's because to try to emphasise the arbitrariness of the producers (and
to check that the consuming code was working as intended), the producing
code deliberately doesn't produce any values on channel 2. Instead, it
sleeps for a second and produces a "late arrival" message.

It's trivial to take out the if statement and show that it works as you'd
expect: https://go2goplay.golang.org/p/TjgiOmZtQhR

-- 
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/CAJhgacjijQzBv-PmtbyYYvQJmv%2BhBksG6nBGvcT238EwVJ%2BW%2Bg%40mail.gmail.com.

Reply via email to