Virtual Threads, Structured Concurrency and Scoped Values: Putting it all together

Project Loom is one of the most important projects in the OpenJDK ecosystem. At this year’s Voxxed Days Amsterdam, I’ll be presenting a live‑coding deep dive on how Loom’s new concurrency model changes the way we design, structure, and scale modern Java applications.

The traditional Java threads (also known as platform threads) have limitations that make managing concurrency at scale complex. Project Loom aims to address these complexities by introducing a simpler, more powerful concurrency model that is approachable and highly performant. The project centers around three core features: Virtual Threads, Structured concurrency, and Scoped Values. Each is powerful on its own, but together they shine and allow is to write elegant concurrent code.

Virtual threads are the foundation. Unlike traditional threads, virtual threads are extremely lightweight, enabling Java applications to scale to massive levels of concurrency without the overhead typically associated with thread creation and blocking operations. They allow developers to continue writing straightforward, imperative code while the JVM does the heavy lifting. With virtual threads, high-throughput concurrency becomes easy to achieve and results in readable code.

Building on this foundation is Structured Concurrency, which brings clarity and predictability to concurrent programming. Instead of scattering asynchronous tasks across a codebase, structured concurrency organizes them into well-defined scopes and lifecycles. It promotes readable code, reduces edge-case errors, and makes cancellation and error handling intuitive. In my talk, I’ll demonstrate how applying structured concurrency to a Spring Boot application dramatically improves the way we coordinate parallel tasks.

The third feature, Scoped Values, is a modern alternative to ThreadLocal. It is designed with virtual threads in mind. Scoped values provide a safe, efficient way to share data across call stacks, without the pitfalls and memory concerns associated with storing ThreadLocal-s. When combined with virtual threads and structured concurrency, they form a coherent and powerful toolkit for building reliable, scalable concurrent flows.

During the session, we’ll explore these three features in a practical, hands-on way. We’ll start with a simple Spring Boot application and enable virtual threads. From there, we’ll build new features using the structured concurrency API and incorporate scoped values to highlight their unique advantages. The session will be packed with live coding, real-world-like examples, and insights you can apply to your own projects.

If you’re curious about these Java concurrency features and want to see how Project Loom can make it easy to write and read concurrent applications, join me for my talk: “Virtual Threads, Structured Concurrency and Scoped Values: Putting it all together.”
See you at Voxxed Days Amsterdam for a deep dive into the future of Java concurrency.