~/talk

Introduction and pitfalls of Java's new concurrency model

Talkat Voxxed Days Brussels 2023 · on Tuesday, 2023-05-23· [java, concurrency]
slides:none on file

Java 20/21 virtual threads run as heap‑allocated stacks so creating 100,000 virtual threads in ~225 MB is feasible; demo shows 10,000 sleeping VT tasks start instantly via Executors.newVirtualThreadPerTask. Virtual threads execute on platform carrier threads and are unmounted on blocking calls, but remain pinned by synchronized/native/JNI/file I/O, losing benefits. Structured concurrency (StructuredTaskScope) provides shutdown policies (on success/failure) and examples: fork two tasks, join first result or cancel all on any exception.

AI-written summary · about

  1. 0:00Start
  2. 0:36Outline
  3. 3:40One thread for each task
  4. 6:32Virtual threads
  5. 17:00How does it work
  6. 21:33Structured concurrency
~/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.