3 ms·
If it wasn't good enough why do NodeJS, Golang, Erlang, Ponylang and the commenter above still use it? The reason is OS level process scheduling has different r
by imtringued 8y ago
If it wasn't good enough why do NodeJS, Golang, Erlang, Ponylang and the commenter above still use it? The reason is OS level process scheduling has different requirements than task scheduling within a single application. The compromise is significantly lower efficiency in exchange for not letting rouge processes lock up the system. The poster child here is Erlang, which does a context switch on every function call because it has to switch to the receiving actor. Can your OS scheduler keep up with that?
- amelius 8y agoI wouldn't call Erlang's model "cooperative multitasking", since you can't make the assumption that there will be no context switch without giving up calling functions. In other words, it's cooperative, but under the enormous pressure that if you make a function call, you have to give up the thread of execution.