Virtual Threads, Structured Concurrency & Scoped Values: Putting it All Together
summary
Builds a Spring Boot 4.0 banking app on JDK 26 that swaps Tomcat’s platform threads for virtual threads to let the server spawn massive numbers of user threads (thousands to millions) cheaply. Uses StructuredTaskScope to fork concurrent calls—customer, accounts, loans and two credit-score services—uses the anySuccess/throw joiner so one credit score returns and the other is canceled, demonstrates cancellation propagation on failure, and tags requests with a ScopedValue.newInstance request ID inherited into child virtual threads; the demo runs and logs traceable request IDs.
AI-written summary · about
chapters (10)
- 0:00Introduction and survey
- 1:50Project Loom overview
- 2:35Virtual threads explained
- 6:02Demo platform to virtual threads
- 9:31Structured concurrency introduction
- 13:17Structured concurrency API demo
- 21:09Implementing loan application
- 31:44Scoped values introduction
- 35:55Scoped values API demo
- 44:04Summary and Q&A
related talks
48mVirtual Threads, Structured Concurrency and Scoped Values: Putting it all together
42mVirtual Threads, Structured Concurrency and Scoped Values: Putting it all together
01h 03mBeyond Virtual Threads: Structured Concurrency
44mStructuredTaskScope And ScopedValue - Get The Most Out of Virtual Threads
44mStructuredTaskScope And ScopedValue - Get The Most Out of Virtual Threads
50mGet The Most Out of Virtual Threads in Java 25 -A Deep Dive into the Latest Achievements of Virtual
49mStructuredTaskScope And ScopedValue - Get The Most Out of Virtual Threads
38mStructuredTaskScope And ScopedValue - Get The Most Out of Virtual Threads
