Get the Most Out of Virtual Threads
If you’re psyched about Java 21’s Virtual Threads, Christian Woerz dives into two third-preview gems: StructuredTaskScope and ScopedValue. In a fun live-coding session you’ll start with a blank Java app and iteratively build a full-blown concurrent web application, seeing firsthand how virtual threads, task scopes, and scoped values all fit together.
Along the way you’ll learn why ScopedValues beat ThreadLocals when you can use them, how to craft your own StructuredTaskScopes for your needs, and walk away with a solid, real-world understanding of these powerful new features.
Watch on YouTube
Top comments (0)