Scale Forem

Scale YouTube
Scale YouTube

Posted on

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

Virtual threads landed in Java 21, but to really unlock their power you’ll want to pair them with two in-preview features: StructuredTaskScope and ScopedValue. In a live-coding demo, you’ll start from a barebones Java app and iteratively transform it into a fully concurrent web service, learning how to ditch ThreadLocals in favor of ScopedValues and craft custom TaskScopes that fit your needs.

By the end of the session, you’ll walk away with hands-on experience and a solid grasp of how StructuredTaskScope and ScopedValue work together to make virtual-threaded code easier to write, reason about, and maintain.

Watch on YouTube

Top comments (0)