~/talk

Structured Concurrency in Java

Talkat Great International Developer Summit 2025 · 2025-04-22..04-25· [java]
slides:none on file

Java 21’s structured concurrency is shown as a concrete replacement for raw executors using StructuredTaskScope and virtual threads, with a live demo that forks subtasks to resolve mocked IATA airport names and uses joinUntil with a 10s timeout. Code examples implement shutdownOnFailure (one child fails then interrupts others), shutdownOnSuccess (first success cancels remaining), result() and throwIfFailed, and a preview scoped values API for immutable per-scope data; warning: APIs are preview and not production stable.

AI-written summary · about

  1. 0:00Introduction to structured concurrency
  2. 1:47Concurrency problems and history
  3. 8:12Parent-child task relationships
  4. 16:24Why structured concurrency
  5. 19:12Basic structured task scope
  6. 25:22Never block without timeout
  7. 31:48Shutdown on failure
  8. 35:50Shutdown on success
  9. 42:17Collecting results and exceptions
  10. 45:10Real-world use cases
  11. 47:58Key features and benefits
  12. 49:24Scoped values overview
  13. 56:57Summary and closing
~/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.