~/talk

Structured Concurrency in Java - The What and the Why

Talkat JCON EUROPE 2024 · 2024-05-13..05-16· [java, concurrency]
slides:none on file

Live coding demonstrates that Java’s Structured Concurrency uses virtual threads to run one thread per business task (thousands to millions cheaply), with a StructuredTaskScope API (e.g. shutdownOnFailure, shutdownOnSuccess) to fork, join and propagate cancellation. Examples: event management (three subtasks joined), weather (first successful wins — unlike CompletableFuture.anyOf failure behavior), and customer -> parallel savings+loans then offer. Implementations run and match expected behavior; caveats include runtime errors when join is omitted and pinning on synchronized/native calls.

AI-written summary · about

  1. 0:00Introduction
  2. 1:27Structured concurrency basics
  3. 4:35Project Loom and virtual threads
  4. 8:58Virtual threads in action
  5. 12:25Structured concurrency in Java
  6. 16:16API comparison and examples
  7. 38:04Advanced patterns and pinning
  8. 40:06Q&A session
~/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.