StructuredTaskScope And ScopedValue – Get The Most Out of Virtual Threads
In this talk, Christian Woerz dives into Java 21’s hot new toy—virtual threads—and shows how to juice their performance and safety by pairing them with two third-preview beauties: StructuredTaskScope and ScopedValue. You’ll see why ScopedValues are the shiny, less-leaky replacement for old-school ThreadLocals and how you can spin up custom task scopes tailored to your exact needs.
Starting from an empty Java app, the session morphs into a full-blown concurrent web service through a live coding demo. By the end, you’ll walk away with a rock-solid understanding of how these features tick and exactly how to wield them in real-world projects.
Watch on YouTube
Top comments (0)