~/talk

Creating Asynchronous Applications with Virtual Threads

Talkat Great International Developer Summit 2024 · 2024-04-23..04-26· [java]
slides:none on file

Recent Java releases add virtual threads and the claim is concrete: by swapping Executors.newFixedThreadPool to Executors.newVirtualThreadPerTaskExecutor code runs many more concurrent tasks without native-thread exhaustion. A demo shows native threads hit OOME around 10k while 100,000+ virtual threads and even a million proceed fine because sleeps and IO unmount the virtual thread from carrier threads. It presents the cores/(1–blockingFactor) sizing rule, warns do not pool virtual threads, and advises: use virtual threads for IO‑bound work, not heavy CPU.

AI-written summary · about

  1. 0:00Introduction to virtual threads
  2. 3:14Threads should vs can
  3. 15:37Problem with blocking threads
  4. 21:25Introducing virtual threads
  5. 36:50How virtual threads work
  6. 42:11Using virtual threads with executors
  7. 51:16Q-tips analogy for virtual threads
  8. 55:41Dos and don'ts of virtual threads
~/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.