3 ms·
That issue is quite simply a misinterpretation of goroutines. Erlang: perform a maximum number of reductions, then switch, or switch on IO. The number of reduc
by JulianMorrison 14y ago
That issue is quite simply a misinterpretation of goroutines.
Erlang: perform a maximum number of reductions, then switch, or switch on IO. The number of reductions is cleverly adjusted so that a process which is swamping other processes will be throttled.
Go: switch on IO.
Go's design is much simpler, and closer to Ruby Fibers than to Erlang processes, except that goroutine scheduling can use multiple threads. To cooperatively switch without doing IO, call runtime.Gosched().