~/talk

Virtual threads - no pain, no gain

Talkat GeeCON 2024 · 2024-05-15..05-17· [java, concurrency]
slides:none on file

Project Loom virtual threads run on a pool of carrier (ForkJoin) threads and make blocking code look synchronous while actually unmounting and remounting work onto OS threads. Experiments use Quarkus and JDK 22 preview, with defaults: platform threads ~7–8k limit, carrier pool default parallelism = CPU cores, hard max = 256, Quarkus limits thread creation to 200. Practical failures include pinning (synchronized or native calls), monopolization (long CPU work blocks a carrier), and costly thread-local copy inflation; detection uses JFR events and stack dumps. Overall Loom works but libraries must be fixed first.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:11Traditional threading model explained
  3. 3:41Reactive programming with event loops
  4. 7:34Virtual threads introduction
  5. 12:05Key issues with virtual threads
  6. 18:28Live coding demo setup
  7. 22:43Q&A session
  8. 24:50Creating virtual threads in code
  9. 30:50Monopolization and career thread scaling
  10. 35:54Pinning and synchronized blocks
  11. 41:39Detecting pinning with JFR events
  12. 42:24Thread locals in virtual threads
  13. 47:02Future of Project Loom and ecosystem
  14. 48:26Closing remarks and resources
~/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.