IntelliJ IDEA
IntelliJ IDEA – the Leading Java and Kotlin IDE, by JetBrains
New Livestream: Virtual Threads and Structured Concurrency in Java 21 With Loom
Updated on 13/12/2023.
On May 25, 2023, we hosted our IntelliJ IDEA LiveStream with José Paumard to learn how to work with virtual threads.
Session abstract
Loom brought 2 preview features in Java 19: virtual threads and structured concurrency. Virtual threads are a new model of thread that is compatible with the current platform threads but much lighter. You can easily launch millions of virtual threads on a machine that would only support a few thousand platform threads. Virtual threads should be made final in JDK 21. Structured concurrency leverages this feature to write asynchronous code in a very easy way. It is built on an imperative mono-thread programming model built on top of virtual threads. These elements have been updated in Java 20. Java 20 also has a third preview feature delivered by the Loom project: a new model for ThreadLocal variables called ScopedValues that is meant to work with virtual threads. This presentation shows you how this all works, the new pattern you will be able to use for your asynchronous systems, and the performance you may expect.
Asking questions
José will try to answer all of your questions during the session. If we run out of time, we’ll post the answers to any remaining questions in a follow-up blog post. We’ll do our best to get all of your questions answered.
Your speaker and host
Speaker
Host
Happy developing!