[go-nuts] Re: [golang-dev] help me with gorutines

2016-09-05 Thread Dave Cheney
Please redirect this question to golang-nuts. On Sun, Sep 4, 2016 at 7:22 AM, Ринат Галиев 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 «// red

[go-nuts] Re: [golang-dev] help me with gorutines

2016-09-06 Thread airborne . spatula
Hello, You almost had it, just backwards. In this play, the goroutines are waiting for permission to print their next value, printing it, then passing the permission to the other goroutine. https://play.golang.org/p/LsxOfKihM7 I think that meets your //redact requirements too. Have fun. On Tues