Java 21’s virtual threads are fantastic, but to really squeeze their power Christian Woerz spotlights two third-preview features: StructuredTaskScope for managing groups of tasks and ScopedValue for cleanly sharing data instead of ThreadLocals.
In a live-coding session starting from an empty project, he builds a concurrent web app, shows how to craft custom task scopes, explains why ScopedValues beat ThreadLocals, and gives you the know-how to apply these tools in real-world scenarios.
Watch on YouTube
Top comments (0)