WeAreDevelopers LIVE • Sep 14, 2023

Introduction and pitfalls of Java's new concurrency model

David Vlijmincx

Are you accidentally paralyzing your Java 21 applications? Discover why pooling virtual threads is an anti-pattern and how to avoid thread pinning to maximize system throughput.

Pause
Mute Enter Fullscreen
#1 about 5 min

Analyzing the traditional Java platform thread model

The legacy Java threading model uses OS-managed platform threads that consume excessive memory and delay processing.

#2 about 4 min

Managing thread resources with executor service pools

Utilizing executor service pools enables thread reuse but can introduce state leaks and structural blocking inefficiencies.

#3 about 2 min

Introducing virtual threads for lightweight concurrency allocation

Virtual threads eliminate core memory allocation limits by utilizing a resizable heap design natively administered within the JVM.

#4 about 3 min

Comparing memory usage between platform and virtual threads

A memory utilization benchmark demonstrates how virtual threads seamlessly scale to support one hundred thousand parallel execution tasks.

#5 about 6 min

Creating and executing virtual threads in Java code

Implementing virtual thread constructors and specialized executor interfaces simplifies massively parallel programming workflows.

#6 about 6 min

Thread mounting and carrier thread execution processes

Carrier threads manage JVM virtual threads via fork-join pools that handle automatic mounting limits during blocking operations.

#7 about 3 min

Recognizing common virtual thread operational pitfalls and limitations

Pooling virtual threads or leveraging them for continuous CPU-bound computations reduces their scaling effectiveness and introduces overarching failures.

#8 about 6 min

Analyzing the risks of unstructured parallel thread behavior

Failing to declare explicit task relationships often creates orphaned threads and wastes execution resources during unexpected errors.

#9 about 7 min

Managing thread lifecycles using structured task scopes

The Java StructuredTaskScope object explicitly controls thread intent through embedded success validation and automated failure shutdown directives.

#10 about 7 min

Building custom structured task scopes for dynamic thread completion

Extending the base scope object enables advanced threshold logic that safely cancels competing threads upon finding designated successful criteria.

#11 about 10 min

Exploring reactive programming implications and virtual thread usage

Common implementation concerns highlight specific ecosystem boundaries around framework migrations, reactive programming displacement, and thread-local modifications.

Matching moments

2:23 min

Simplifying concurrent code with Java 21 virtual threads

Jan Weinschenker Jan Weinschenker · World Congress 2024

2:19 min

Key takeaways for adopting virtual threads in Java

Christian Woerz · LIVE

3:49 min

Scaling concurrent applications using lightweight virtual threads

Ron Veen Ron Veen · World Congress 2023

3:08 min

Refactoring concurrent operations using the structured task scope

Filip Egeric Filip Egeric · World Congress 2026 Europe

1:00 min

Introduction to the native Java structured task scope API

Filip Egeric Filip Egeric · World Congress 2026 Europe

10:03 min

Addressing updates on concurrency extensions and code diagnostics

Mohamed Taman · LIVE

Upcoming sessions on this topic

Open session

Java is Coming for Python’s Lunch: The Rise of JVM AI Agents

  • Frederik Pietzko

    Jetbrains

    Developer Advocate

Open session

How We Cut Our API's p99 Latency from Minutes to Under a Second

  • Deepak Agrawal

    Atlassian

    Principal Software Engineer

Open session

Multi-Cloud Isn't a Project. It's a Side Effect.

  • Antonio Mendoza Pérez

    Temporal Technologies

    Staff Developer Success Engineer

  • Gaurav Thadani

    Temporal

    Staff Developer Success Engineer

Open session

Beware of Strangers Bearing Code: Open Source Trust in the Agent Era

  • Vikram Vaswani

    Consultant

Open session

Beyond File Dumps: Context Engineering for Coding Agents

  • Animesh Dutta

    Arm

    Senior Software Engineer

Open session

React Under Fire: Rendering Performance for Streaming Agent UIs

  • Abhirupa Mitra

    Slack

    Senior Member of Technical Staff