Get the Most Out of Java 21 Virtual Threads
Virtual threads are cool on their own, but when you team them up with StructuredTaskScope and ScopedValue (both in their third preview!), you unlock next-level concurrency. Christian Woerz guides you through a live coding session—starting from an empty Java app and iteratively turning it into a full-blown concurrent web service by mixing in virtual threads, custom task scopes, and ScopedValues instead of ThreadLocals.
By the end of the talk you’ll see why ScopedValues are safer and cleaner than ThreadLocals, learn how to build your own StructuredTaskScopes for custom needs, and walk away with a solid recipe for using these new features in real-world projects.
Watch on YouTube
Top comments (0)