News for hackers. Stuff that matters.
Re:C# functional language extensions and Erlang-like concurr... by bitwalker on Sunday January 29, 2017 @01:51PM (#13515855)
I think what he meant is that from a programmer's point of view, Erlang appears to be preemptive (there is no explicit yielding of control, ala golang or lua, the two I can think of off the top of my head), even if the scheduler itself is cooperative. The place where this most obviously reveals itself is with NIFs, where the scheduler can no longer preempt the process, and is blocked until the NIF finishes executing. At least that's my understanding.
Re:C# functional language extensions and Erlang-like concurr... by jahewson on Sunday January 29, 2017 @01:55PM (#13515872)
Right, that's exactly what I said above. But OS threads are preemptive in exactly the same way. It is not unique to Erlang as claimed, in fact it's the norm.
Re:C# functional language extensions and Erlang-like concurr... by dxhdr on Monday January 30, 2017 @01:03AM (#13519033)
I think you're confusing the issue; OS processes are preemptive, threads within a process are not. Preemptive threads are not the norm on Unix / Linux / Windows systems. The BEAM VM implements its own threads which allows for them to be preemptively scheduled.