Beyond Virtual Threads: Structured Concurrency
summary
A Spring Boot 4 app on JDK 26 is built live, switching Tomcat handlers to Virtual Threads enabled via spring.threads.virtual, then using StructuredTaskScope to fork IO calls (accounts, loans, two credit-score services) so they run concurrently and join with short‑circuiting and cancellation propagation via StructuredTaskScope.join with anySuccessful joiner. ScopedValue holds a request UUID across forked virtual threads for logging (ScopedValue for request ID). Observability is shown with IntelliJ's thread‑dump view; demo code is on GitHub.
AI-written summary · about
chapters (6)
- 0:00Intro
- 1:42Project Loom
- 2:36Virtual Threads
- 13:30Structured Concurrency
- 46:09Scoped Values
- 1:01:52Summary
related talks
47mVirtual Threads, Structured Concurrency & Scoped Values: Putting it All Together
42mVirtual Threads, Structured Concurrency and Scoped Values: Putting it all together
48mVirtual Threads, Structured Concurrency and Scoped Values: Putting it all together
44mStructuredTaskScope And ScopedValue - Get The Most Out of Virtual Threads
44mStructuredTaskScope And ScopedValue - Get The Most Out of Virtual Threads
49mStructuredTaskScope 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
38mStructuredTaskScope And ScopedValue - Get The Most Out of Virtual Threads
