Scale Forem

Scale YouTube
Scale YouTube

Posted on

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

Get the Most Out of Virtual Threads

Java 21’s virtual threads are a game-changer, but to really squeeze out their potential you’ll want to pair them with two preview-phase features: StructuredTaskScope and ScopedValue. In a live coding session, we’ll kick off with a blank Java app and iteratively transform it into a fully concurrent web application, weaving in virtual threads, custom task scopes, and scoped values.

Along the way you’ll discover why ScopedValues trump ThreadLocals for most use cases, how to craft your own StructuredTaskScopes for tailored concurrency management, and gain a solid, hands-on understanding of these powerful additions to the JDK.

Watch on YouTube

Top comments (0)