Hacker News new | ask | show | jobs
by zmmmmm 1503 days ago
thanks, this explains the mysterious magic that I think is probably bugging a lot of people.

It will be interesting to see how much of a coloring problem this creates, if any. I guess the great thing about having it be standardised and baked into the language / VM is it will quickly become de facto best practice to make any such library code compliant with virtual threads. And for all its various downsides, the java ecosystem has always leaned away from native code and treated it as a last resort rather than leaning into it like Python etc. So likely it will not be a huge issue the way the coloring problem is in the async/await situation.

2 comments

As a preparation, some parts of the standard library indeed had to be rewritten in pure Java to be compatible with Loom, for example the socket implementations.

https://openjdk.java.net/jeps/373

http://openjdk.java.net/jeps/353

Yes in other languages with this baked into the platform - such as Haskell, Go and Erlang - it just works and there is no color problem.