TL;DR
Imagine spinning up lightweight threads for each request—Java 21’s virtual threads make it a breeze. But to really scale and keep your code manageable, StructuredTaskScope and ScopedValue are your new best friends. In this talk, Christian Woerz takes you from an empty Java app to a fully concurrent web service through live coding, weaving in virtual threads, ScopedValues (nicer than ThreadLocals), and custom StructuredTaskScopes along the way.
You’ll see exactly how these preview features work, why ScopedValues trump old-school ThreadLocals, and how to craft your own scopes so you can harness the full power of structured concurrency in real-life scenarios.
Watch on YouTube
Top comments (0)