WeAreDevelopers LIVE Jan 19, 2024

Java 21: The Revolution of Virtual Threads - A Deep Dive

Christian Woerz

Java 21 makes blocking great again. Discover how virtual threads replace complex reactive tooling, letting you fluidly scale to millions of concurrent operations with one Spring Boot flag.

Pause
Mute Enter Fullscreen
#1 about 4 min

Building a traditional blocking web application

Traditional synchronous controller endpoints block threads during simulated fixed HTTP delays.

#2 about 2 min

Performance testing a blocking API with JMeter

High concurrency requests to a fixed thread pool generate significant response time degradation.

#3 about 5 min

Memory limits of standard Java platform threads

Attempting to scale up operating system threads results in crippling heap memory exhaustion.

#4 about 5 min

Resolving blocking bottlenecks using reactive programming

Using asynchronous completable futures allows threads to detach during input-output wait periods.

#5 about 8 min

The complexity and maintainability tradeoffs of reactive programming

Nesting future chains and fragmented libraries create boilerplate code that obscures core application logic.

#6 about 2 min

Overview of Project Loom and virtual threads

Project Loom introduces lightweight thread constructs that avoid the megabyte costs of operating system resources.

#7 about 2 min

How virtual threads detach and remount under the hood

Virtual threads unmount from active fork-join pools into the heap when encountering blocking input-output.

#8 about 4 min

Spawning one million virtual threads successfully

Minimal footprint structures allow over a million concurrent threads without overextending physical memory limits.

#9 about 3 min

Enabling virtual threads in a Spring Boot application

A simple property toggle replaces legacy Tomcat thread pooling with unpooled virtual request handlers.

#10 about 6 min

Executing parallel tasks concurrently with structured task scopes

Structured execution blocks permit synchronous code logic to run multiple background routines in parallel.

#11 about 4 min

Implementing custom structured task scopes for collections

Reusable scope extensions transparently gather asynchronous thread results into thread-safe queues.

#12 about 3 min

Virtual thread limitations and thread local behaviors

Synchronized keywords, native allocations, and intense calculations pin virtual threads permanently to backing workers.

#13 about 3 min

Key takeaways for adopting virtual threads in Java

Removing complex asynchronous layers yields highly performant, maintainable legacy APIs within modern Java environments.

#14 about 10 min

Discussion on scalability and concurrent application performance

Community questions address thread reuse limits, structural debugging environments, and the nature of freelance programming.

Matching moments

1:27 min

Introduction to Loom and its impact on concurrency

Ivan Šarić Ivan Šarić · Europe 2026 Virtual

2:05 min

Goals and concepts behind Java Project Loom

Jan Weinschenker Jan Weinschenker · WWC 2024

46 sec

Contrasting Project Loom virtual threads with reactive semantics

Josh Long · WWC 2022

2:23 min

Simplifying concurrent code with Java 21 virtual threads

Jan Weinschenker Jan Weinschenker · WWC 2024

1:39 min

Virtual threads as the ultimate concurrency performance upgrade

Jonathan Vila · LIVE

1:57 min

Introducing virtual threads for lightweight concurrency allocation

David Vlijmincx · LIVE

Upcoming sessions on this topic

Open session

World Congress 2026 North America

Look What Java Can Do Now: Live-Coding a GenAI MCP Server with the JAQ Stack

Suren Konathala

Senior Engineering Leader, Marketing & AdTech, AI GTM & Digital Experience Platforms, Java x AI

Suren Konathala
Open session

World Congress 2026 North America

When Humans Stop Writing Code: Rethinking Languages, Compilers, and Responsibility

Simon Auer

Organizer of flutter vienna meetup and CEO of marqably

Simon Auer
Open session

World Congress 2026 North America

Offloading IoT State: Solving the Memory Crisis on Legacy Hardware

Pravin Nagare

Senior Software Engineer, Roku

Pravin Nagare
Open session

World Congress 2026 North America

Merging at Scale: From Broken Builds to Green Mainline

Manjari Akella, Preetam Dwivedi

Manjari Akella
Preetam Dwivedi
Open session

World Congress 2026 North America

It’s Alive! Taming the MLOps Franken-Stack: Write, Run, and Serve with Michelangelo

Eric Wang, Paul Zimmerman

Eric Wang
Paul Zimmerman
Open session

World Congress 2026 North America

From Cloud Native to Multi-Cloud Native: Write Once, Deploy Anywhere

Sandeep Pal

Principal Member of Technical Staff at Salesforce

Sandeep Pal