3 ms·
"Green Threads" as implemented in Java is a solution that solves only a single problem - blocking/multiplexing. It does not enable easy concurrency and task/fu
by neonsunset 2y ago
"Green Threads" as implemented in Java is a solution that solves only a single problem - blocking/multiplexing.
It does not enable easy concurrency and task/future composition the way C#/JS/Rust do, which offer strictly better and more comprehensive model.
- za3faran 2y agoStructured concurrency[1] offers task composition and more. [1] https://openjdk.org/jeps/453 https://openjdk.org/jeps/453
- he0001 2y agoWhat do you mean? It implements the Future/Task interface and you can definitely use that. In fact you can’t tell the difference from a virtual thread vs a platform one, and it’s available everywhere. I for one thinks it’s much easier to use than the async/await pattern as I don’t need any special syntax to use it.