Hacker News new | ask | show | jobs
by cryptos 60 days ago
I think that Java has a really good solution to offer: Virtual Threads. They share the same interface with native threads and free developers from the burdens of async programming. You only need to take care of some things like accidental thread pinning (through legacy code) and the use of ThreadLocal, but otherwise this complexity is hidden.

https://docs.oracle.com/en/java/javase/21/core/virtual-threa...