|
|
|
|
|
by amelius
3728 days ago
|
|
> AFAIK, Erlang is still (as of 2016) the only distributed actor model implementation with preemptive scheduler. It is one of the open issues with Golang. https://github.com/golang/go/issues/11462 User aclements notes: > @GoranP, you can think of the Go scheduler as being partially preemptive. It's by no means fully cooperative, since user code generally has no control over scheduling points, but it's also not able to preempt at arbitrary points. Currently, the general rule is that it can preempt at function calls, since at that point there's very little state to save or restore, which makes preemption very fast and dramatically simplifies some aspects of garbage collection. Your loop happens to contain none of these controlled preemption points, which is why the scheduler can't preempt it, but as @davecheney mentioned, this is fairly uncommon in real code (though by no means unheard of). We would like to detect loops like this and insert preemption points, but that work just hasn't happened yet. |
|