~/talk

Butcher Virtual Threads like a pro!

Talkat Devoxx France 2024 · 2024-04-17..04-19· [java]
links:none on file
slides:none on file

Creates and destroys 1 million virtual threads to show they’re cheap but proves CPU-bound work doesn’t get faster, only scale improves; builds a containerized demo with Testcontainers + Toxiproxy + Elasticsearch that injects 500ms latency to catch pinning; detects pinned virtual threads with -Djdk.TracePinnedThreads and JFR and shows causes: long blocking IO, synchronized blocks, native calls; demonstrates the newVirtualThreadPerTask executor, scope values (immutable replacement for ThreadLocal), structured concurrency cancellation, and pitfalls like mutable AtomicInteger and improper monitoring.

AI-written summary · about

  1. 0:00Virtual threads demo
  2. 1:48Flaws in naive demos
  3. 4:49Speaker introduction
  4. 6:35History of concurrency
  5. 9:20How virtual threads work
  6. 13:46Avoiding pinning
  7. 16:01Elasticsearch container demo
  8. 25:13Stream performance issues
  9. 30:41Monitoring risks
  10. 33:45Structured concurrency intro
  11. 35:58Scope values demo
  12. 41:18Structured concurrency demo
  13. 46:46Conclusion and Q&A
~/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.