~/talk

Butcher Virtual Threads like a pro!

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

Claim: virtual threads let the JVM host one million virtual threads only when those threads mostly sleep or wait; CPU‑bound work still saturates cores so throughput stays limited. Demo builds a reproducible failure using Testcontainers + NGINX + toxy proxy (latency injected) and JFR to show virtual threads get pinned when IO runs inside synchronized blocks. Code experiments show virtual threads don’t speed CPU work, parallel streams behave similarly, and fixes are: add backpressure, avoid pinning, make tasks interruptible, use structured concurrency and immutable scope values.

AI-written summary · about

  1. 0:00Introduction to virtual threads
  2. 4:54About the speaker
  3. 6:18History of Java concurrency
  4. 9:11What are virtual threads
  5. 12:48How to use virtual threads
  6. 14:33Virtual threads limitations
  7. 16:18Mistakes to avoid with virtual threads
  8. 21:00Demo: Detecting pinned virtual threads
  9. 27:44Demo: Virtual threads and CPU-bound tasks
  10. 33:18Demo: Backpressure with virtual threads
  11. 40:31Structured concurrency explained
  12. 46:31Scope values in Java
  13. 48:15Demo: Scope values with Star Trek
  14. 54:11How to misuse virtual threads
  15. 55:20Call to action 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.