News for hackers. Stuff that matters.
Re:The Zen of Erlang (2016) by apta on Monday July 20, 2020 @12:14AM (#23894601)
As you point out, the JVM is getting preemption by means of Loom. .NET already has coroutines (async/await) so it should already do what you stated.
Re:The Zen of Erlang (2016) by smabie on Monday July 20, 2020 @02:42AM (#23895262)
I'm not super familiar with .NET, but if it supports preemption, they why this?

https://getakka.net/articles/concepts/actor-systems.html#blo...

Coroutines in general are a form of cooperative multi-tasking (they must explicitly yield), but I might missing something about .NET's implementation.

Re:The Zen of Erlang (2016) by apta on Monday July 20, 2020 @10:52AM (#23898395)
It is specific to blocking APIs, as per the page:

> Examples are legacy RDBMS drivers or messaging APIs, and the underlying reason is typically that (network) I/O occurs under the covers

The issue with async/await is that APIs need to be extended with their async counterparts. If they don't, then you have to be sure not to invoke blocking calls. Java won't have this issue as the runtime will take care of preemption.