On Sunday, October 22, 2017 at 5:55:54 AM UTC-4, Jan Mercl wrote: > > On Sun, Oct 22, 2017 at 9:19 AM T L <tapi...@gmail.com <javascript:>> > wrote: > > > why? > > The OP code with line numbes: https://play.golang.org/p/4fmiWqDDc1 > > The main goroutine busy loops at lines 15-20. Because of that the > goroutine at line 10 may never run and thus line 17 may never get executed. > If so, line 18 and thus also lines 27 and above may also never get executed. > > -- > > -j >
Aha, yes, if GOMAXPROCS is 1, then the main goroutine will become greedy. -- 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.