Scale Forem

Scale YouTube
Scale YouTube

Posted on

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

TL;DR

Christian Woerz dives into making the most of Java 21’s virtual threads by pairing them with the new (preview) StructuredTaskScope and ScopedValue features. In a live-coding session, he starts with a bare-bones Java app and gradually transforms it into a concurrent web service, showing you exactly how these tools mesh to simplify thread management.

Along the way, you’ll see why ScopedValue is often a better choice than ThreadLocal, how to craft your own StructuredTaskScope variants, and—most importantly—walk away with a clear, real-world blueprint for using virtual threads at full throttle.

Watch on YouTube

Top comments (0)