~/talk

Game of Loom 2: life and dead(lock) of a virtual thread

Talkat Voxxed Days Ticino 2024 · on Friday, 2024-01-19· [java, concurrency]
slides:none on file

Virtual threads in JVM 21 are stable but carry concrete limits: experiments running 64 CPU-bound tasks on an 8-core machine show groups of eight virtual threads hogging a core due to non‑preemption, and a JMH benchmark with 100 workloads measures virtual threads as twice as slow because mounting/unmounting dominates time. ThreadLocal usage explodes memory with millions of virtual threads so scoped values are needed; carrier behavior is fixed (carrier thread pool is fixed to ForkJoin) and swapping it for an event-loop carrier causes a surprising single-lock deadlock.

AI-written summary · about

  1. 0:00Introduction
  2. 1:53Virtual threads overview
  3. 6:15Limitations and challenges
  4. 11:42CPU bound task concerns
  5. 17:43Scheduling and cost
  6. 23:29Thread locals and scope
  7. 28:51Resource management pitfalls
  8. 36:13Event loops and deadlocks
  9. 44:06Conclusion
~/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.