Scale Forem

Scale YouTube
Scale YouTube

Posted on

Devoxx: StructuredTaskScope And ScopedValue - Get The Most Out of Virtual Threads by Christian Woerz

StructuredTaskScope And ScopedValue: Get the Most Out of Virtual Threads

In this live-coding session, Christian Woerz shows how to supercharge Java 21’s virtual threads using two preview features—StructuredTaskScope and ScopedValue. Starting from a blank slate, he builds a fully concurrent web app step by step, demonstrating how these tools mesh with virtual threads for cleaner, safer concurrency.

Along the way you’ll learn why ScopedValues often beat ThreadLocals, how to craft your own StructuredTaskScope to match your use case, and pick up practical tips for plugging these features into real-world projects. By the end, you’ll have a solid grasp of how to wield these new APIs in production.

Watch on YouTube

Top comments (0)