News for hackers. Stuff that matters.
Re:JVM Anatomy Quarks by diroussel on Saturday February 01, 2020 @05:11AM (#22209748)
In the past I have followed this approach myself. But that is changing. If you want to future proof your code, don't use classic locks. Project Loom doesn't work with classic locks, and the java.nio package is has been re-written to remove classic locks:

> In Project Loom, there will be support for efficiently switching between fibers that use Java 5 locks (that is, the java.util.concurrent.lock package) but not native C locks. As a result, it is necessary to migrate all blocking code in the JDK over to Java 5 locks. So the legacy Socket API required reimplementation to achieve better compatibility with Project Loom.

See: https://blogs.oracle.com/javamagazine/inside-java-13s-switch...

There are no comments on this comment yet.