Best of JDK — December 2024
- 1
- 2
Community Picks·1y
Are virtual threads making reactive programming obsolete?
Java 21 introduces virtual threads and structured concurrency, enhancing scalability and performance by simplifying concurrent programming. Virtual threads minimize the complexity of reactive programming, making the asynchronous programming model easier and more efficient. Structured concurrency groups related tasks for improved error handling and observability. Scoped values offer a better alternative to ThreadLocal variables by being immutable and optimized for performance. These features collectively promise higher throughput and more maintainable code.
- 3
Inside Java·1y
JDK 24 Prepares Restricted Native Access – Inside.java
JDK 24 introduces restricted native access to improve integrity by requiring explicit approval for operations between Java and native code. Warnings will be issued for restricted operations, with plans to turn these into exceptions in the future. Developers can enable or disable these operations using new command-line options. A new tool, jnativescan, can help identify libraries using restricted methods.