Peter, Got your point, thanks!
在 2017年8月20日星期日 UTC+8下午10:09:50,peterGo写道: > > Yp Xie, > > The Go scheduler is cooperative: > https://en.wikipedia.org/wiki/Cooperative_multitasking > > You are using one processor: runtime.GOMAXPROCS(1). Force the main > goroutine to yield: runtime.Gosched(). > > For example, > > https://play.golang.org/p/7HnogkMOOo > > 0: main > 1: main > 0: not main > 2: main > 1: not main > 3: main > 2: not main > 4: main > 3: not main > 4: not main > > > Peter > -- 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.