~/talk

Virtual Threads, Structured Concurrency and Scoped Values: Putting it all together

Talkat Spring I/O 2025 · 2025-05-22..05-23· [concurrency, java]
slides:none on file

Builds a Spring Boot 3.4 app on JDK25 EA (Project Loom) that replaces thread‑pool code with Virtual Threads, creates a loan‑application flow using StructuredTaskScope.open to fork/join REST calls (accounts, loans, two credit‑score services) and uses ScopedValue.newInstance as a request context instead of passing customer objects. Virtual threads are created per task, short‑circuiting cancels sibling tasks (demo shows both credit‑score calls sometimes return simultaneously), errors propagate to produce 500s, and the example successfully returns calculated offers.

AI-written summary · about

  1. 0:00Project Loom features intro
  2. 1:27Project Loom goals
  3. 2:30Platform vs virtual threads
  4. 5:17Virtual threads in Spring Boot demo
  5. 8:29Structured concurrency intro
  6. 13:06Structured concurrency API
  7. 15:35Loan app with structured concurrency demo
  8. 29:19Structured concurrency vs CompletableFuture
  9. 32:26Thread locals limitations
  10. 35:34Scoped values intro
  11. 38:03Scoped values in Spring Boot demo
  12. 43:20Structured concurrency errors
  13. 46:54Summary and resources
~/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.