Scale Forem

Scale YouTube
Scale YouTube

Posted on

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

In this talk, Christian Woerz dives into Java 21’s virtual threads and shows how to squeeze every drop of potential out of them using the two preview features StructuredTaskScope and ScopedValue. Through a live-coding session starting from a blank Java app, he incrementally builds a fully concurrent web service that leverages virtual threads orchestrated by custom task scopes.

Along the way you’ll learn why ScopedValues often beat ThreadLocals, how to craft your own StructuredTaskScopes to match your use case, and get a deep, real-world understanding of these powerful new tools.

Watch on YouTube

Top comments (0)