Unveiling the Magical Power of Java Virtual Threads

Track: Core Java
Abstract
Thread-per-request programming limits application scalability, leading developers to adopt thread sharing and asynchronous programming to better utilize hardware, though this introduces additional complexity. Creating reactive pipelines, debugging them, and visualizing their execution can be complicated tasks, compounded by the complexities that arise when exceptions occur.
Java Virtual Threads enable applications to scale while preserving the thread-per-request style programming. Just as operating systems create the illusion of abundant memory by mapping a large virtual address space to limited physical RAM, a Java runtime can create the illusion of many threads by mapping numerous virtual threads to a few OS threads.

In this session, we’ll explore the mechanics of Java Virtual Threads, their use cases, and the APIs introduced by Project Loom. We’ll also examine how virtual threads perform in real-world scenarios—highlighting throughput, resource efficiency, and common pitfalls. Finally, we’ll compare traditional threads with virtual threads through practical programming examples to see their impact in action and discuss the broader implications for application design, debugging, and performance tuning.
Tobi Ajila
Tobi is a Java Runtime developer for the J9 VM team in Ottawa, Canada. In the past, he has worked on Interpreter optimizations, JVMTI enhancements, JSR 335, and more. Currently, his main focus is on investigating checkpoint/restore technology at the JVM level.