4 ms·
Loom does a small fraction of what the Erlang VM is capable of doing. For one, the Erlang VM has built-in preemptive green thread scheduling, which means it ca
by haspok 4y ago
Loom does a small fraction of what the Erlang VM is capable of doing.
For one, the Erlang VM has built-in preemptive green thread scheduling, which means it can suspend your green thread at ANY instruction, not just when an IO call is in progress.
Loom is a step in the right direction, but Erlang is in its own universe for what it was designed for.
- BenoitP 4y ago> which means it can suspend your green thread at ANY instruction True. Out of curiosity: what's the use case for this? Surely side-effects-out-of-your-system is enough?
- notamy 4y ago> True. Out of curiosity: what's the use case for this? Scheduling is deterministic, which is a VERY useful property to have. See ex. http://erlang.org/pipermail/erlang-questions/2006-December/024588.html http://erlang.org/pipermail/erlang-questions/2006-December/0... about changing scheduler determinism.
- marwis 4y agoThe thread you linked is about the benefits of inducing scheduling non-determinism.
- slekker 4y agoIs Loom THAT big of a deal? Can you point me towards some references of why this is the case?
- SureshG 4y agoYes, IMO game changing for java. Read this JEP - https://openjdk.org/jeps/425 https://openjdk.org/jeps/425 Here is a simple echo server running on Virtual thread (using same old blocking APIs, handle 5m persistent connections) - https://github.com/ebarlas/project-loom-c5m/blob/main/src/main/java/loomtest/EchoServer.java#L24 https://github.com/ebarlas/project-loom-c5m/blob/main/src/ma...
- throwawaymaths 4y agoErlang still has failure domains as a first class concept which neither go or Java are likely to have ever.