~/talk

Introduction and pitfalls of Java's new concurrency model

Talkat Voxxed Days Luxembourg 2023 · 2023-06-21..06-22· [java, concurrency]
slides:none on file

Java 20/21 brings Project Loom virtual threads that let the JVM create thousands cheaply, demonstrated by running 10,000 virtual threads on a laptop; they run on a small number of OS carrier threads and swap via mounting/unmounting. Structured concurrency (StructuredTaskScope) provides shutdown policies — shutdown-on-success, shutdown-on-failure — and examples show custom scopes to stop when a product under a price is found. Watch for pitfalls: pinning (synchronized, native calls, some filesystem ops) and long CPU-bound tasks that negate benefits.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 0:23Current Java concurrency model
  3. 1:05Virtual threads overview
  4. 6:09Creating virtual threads
  5. 9:19Demo virtual threads
  6. 13:16How virtual threads run
  7. 15:44Pitfalls of virtual threads
  8. 17:34Structured concurrency intro
  9. 21:07Structured concurrency demo
  10. 25:50Custom shutdown policies
  11. 29:28Summary and next steps
  12. 30:11Q&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.