Think about how you want your two goroutines to coordinate. Imagine you have two balls that you can throw back & forth between two people. These are like values passing through channels. How could you use the balls to help two people coordinate so that they say the numbers in order? Then translate this into code using channels; i.e. throwing a ball might be a send on a channel and catching one might be a receive.
On Mon, Sep 5, 2016 at 4:08 PM Ринат Галиев <dieselok...@gmail.com> wrote: > Hi, i need to solve the task: > Change the program so that the numbers 1 through 6 were printed to the > console in order. Allowed to amend the sections of code that are marked > commentary «// redact». > https://play.golang.org/p/tUMlHWHfJE > > it is not work: https://play.golang.org/p/hW-9J5YfC4 > > i know, that need to use the channels > > -- > 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. > -- 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.