Thank you so much  Aleksei Perevozov and Jan Mercl 

On Sunday, June 5, 2022 at 7:49:40 PM UTC+5:30 Jan Mercl wrote:

> On Sun, Jun 5, 2022 at 4:06 PM Manjeet S <manjee...@gmail.com> wrote:
>
> > Can someone help me to understand why this code is not working. I'm 
> expecting that <-ch wait until we receive from channel ch
>
> The range statement at line 18 does not complete unless the channel is
> closed. Adding `close(ch2)` at line 14 fixes the problem:
> https://go.dev/play/p/OnmJD04VYDA
>

-- 
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/7c8dc4c6-6496-4763-8e04-b5be7648c368n%40googlegroups.com.

Reply via email to