Goroutines are cooperatively scheduled. Does that mean that goroutines that don't yield execution will cause goroutines to run one by one?
问题 From: http://blog.nindalf.com/how-goroutines-work/ As the goroutines are scheduled cooperatively, a goroutine that loops continuously can starve other goroutines on the same thread. Goroutines are cheap and do not cause the thread on which they are multiplexed to block if they are blocked on network input sleeping channel operations or blocking on primitives in the sync package. So given the above, say that you have some code like this that does nothing but loop a random number of times and