~/talk

Butcher Virtual Threads like a pro!

Talkat J-Fall 2023 · on Thursday, 2023-11-09· [java]
slides:none on file

Demo creates 1 million virtual threads sleeping to show low-memory cost but switches to CPU-bound work to prove virtual threads don’t speed CPU-heavy tasks. Reproduces a bug with toxyproxy + Testcontainers (~500ms delay) and JFR/JFRUnit to detect threads pinned by synchronized blocks (blocking IO inside synchronized causes carrier threads to stay mounted). Shows parallel streams vs virtual threads yield similar throughput for CPU work, demonstrates structured concurrency for immediate cancellation, and warns that mutable scope values reintroduce thread-local bugs.

AI-written summary · about

  1. 0:00Introduction to virtual threads
  2. 4:54Meet the speaker
  3. 6:18History of Java concurrency
  4. 10:57How virtual threads work
  5. 14:33Misconceptions about virtual threads
  6. 16:18Common mistakes with virtual threads
  7. 27:44Virtual threads and CPU-bound tasks
  8. 33:18Observing virtual threads changes behavior
  9. 39:48Back pressure and virtual threads
  10. 40:31Structured concurrency explained
  11. 46:31Scope values in Java
  12. 50:01Demo of scope values
  13. 54:11How to misuse virtual threads
  14. 55:20Q&A and feedback request
~/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.