Happy #Java20 release day, everybody! Get the freshest JDK right here: jdk.java.net/20/ Let's have a quick look at how the preview features progressed this release (after we looked over all the small and not-so-small additions to 20 last week 👇🏾). 🧵
Happy #Java20 release day, everybody! Get the freshest JDK right here: jdk.java.net/20/ Let's have a quick look at how the preview features progressed this release (after we looked over all the small and not-so-small additions to 20 last week 👇🏾). 🧵
VIRTUAL THREADS No material change in the 2nd preview, but some small additions (e.g. to `Thread` and `Future`) that were part of the preview in Java 19, were already finalized because they're useful independently of virtual threads. openjdk.org/jeps/436
SCOPED VALUES This newly incubating API tackles some of the use cases of Thread Locals but work much better with virtual threads: * immutable (no scaling cost with number of threads) * values are removed once out of scope (no leaking) openjdk.org/jeps/429
@nipafx Finally, the ExecutorService extends the AutoCloseable.