On Tue, Dec 4, 2018 at 4:52 PM Alex Dvoretskiy <advoretski...@gmail.com> wrote:
>
> I'm getting "fatal error: all goroutines are asleep - deadlock! on this code.
>
> Why?
>
> https://play.golang.org/p/KgJKu96PF7Q


close(out) when a task ends.

Also, you don't need to pass wg to the goroutine:

https://play.golang.org/p/0K3T7n13emQ

> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to