Re:Async and Await in Rust: a full proposal
by weberc2 on Sunday July 15, 2018 @04:30PM
(#17536904)
To pick some nits and generally elaborate, Erlang's VM also has a scheduler; it's not the presence or lack of a scheduler, it's how efficient it is and what guarantees it allows the programmer to make about their system. For example, OS schedulers are typically pre-emptive, which means your OS thread can get interrupted anywhere. On the otherhand, Go's scheduler (I'm using Go because I'm more familiar with it than with Erlang) only allows context switching at well-defined points in your program. Further, operating system threads have more overhead than in Go (presumably also Erlang) because they're fixed stack size (yes, I know this isn't true for all OSes).
[ Parent
| on HN ]
Re:Async and Await in Rust: a full proposal
by imtringued on Sunday July 15, 2018 @05:49PM
(#17537283)
>only allows context switching at well-defined points in your program.
Erlang works the same way. The VM scheduler will only context switch on a function call. for or while loops don't exist in Erlang which means there is no risk of blocking the scheduler.