runtime.Gosched 问题

pssgo · 2019-03-19 16:58:04 · 879 次点击
更多评论

已解决

网上应该是只调用了 一个CPU 只不过没写出来...

#1

没有看到你说的“只调用了一个CPU”是什么意思。只输出了hello hello是因为你的main函数所在的goroutine在运行完say("hello")之后退出了,go say("world")被runtime安排到local runnable queue上之后没来得及运行就结束了。

#3