by ds300 · 11y ago · 0 comments
The compiler only inserts yeilds at some call sites. It's not a total solution like real preemptive scheduling, so you still need to be careful.
and http://dave.cheney.net/2014/06/07/five-things-that-make-go-f...
Goroutines by specification have the potential to run all at the same time, in the exact way that OS-level threads do.
In older _implementatoins_ of Go, goroutines were not preemptively scheduled, and exactly as you say you had to be careful.