~/talk

StructuredTaskScope And ScopedValue - Get The Most Out of Virtual Threads

Talkat Voxxed Days Crete 2025 · 2025-09-26..09-27· [java, concurrency]
slides:none on file

Live-codes a small Spring Boot app that uses Java 21 virtual threads plus the preview features StructuredTaskScope and ScopedValue to turn three 500 ms blocking info calls (Google, LinkedIn, Facebook — Facebook throws) plus a 1 s talk call into a concurrent, robust flow. Builds a custom StructuredTaskScope with custom Joiner that picks the best result, swaps mutable ThreadLocal for ScopedValue replaces ThreadLocal, and shows with JMeter (≈1,000 concurrent requests) that end-to-end latency drops to 1 second end-to-end while handling failures and exceptions gracefully.

AI-written summary · about

  1. 0:00Virtual threads intro
  2. 1:07Virtual threads performance
  3. 7:53Virtual threads limits
  4. 12:13StructuredTaskScope
  5. 16:46Custom joiner
  6. 23:51StructuredTaskScope features
  7. 24:53ScopedValues vs ThreadLocal
  8. 32:36Recap & Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.