Scale Forem

Scale YouTube
Scale YouTube

Posted on

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

TL;DR

This talk dives into getting the absolute most from Java 21’s virtual threads by pairing them with two preview features: StructuredTaskScope and ScopedValue. You’ll start with a blank Java app and, through live coding, turn it into a concurrent web application that uses virtual threads, manages scope with ScopedValue (rather than ThreadLocal), and even crafts your own custom StructuredTaskScope.

By the end, you’ll walk away with a solid understanding of how these building blocks work together in real-world scenarios—and why they’re a game-changer for writing clean, concurrent code.

Watch on YouTube

Top comments (0)