~/talk

Virtual Threads - what we won or lose using it.

Talkat Java ON 2024 · 2024-11-12..11-14· [concurrency, java]
links:none on file
slides:none on file

JEP 444 introduces virtual threads that move blocking IO off OS cores so many more requests run concurrently without code rewrites; enabling spring.thread.virtual.enabled flips from platform threads to virtual threads. Demo runs 32 concurrent requests: classic threads process eight at a time and take 12s, virtual threads handle them in ~3s. Virtual threads shine for API calls, DB queries and BFFs and are production-ready in Java 21; they hurt or add overhead for CPU-bound in-memory aggregations and tight low-latency code.

AI-written summary · about

  1. 0:00Introduction
  2. 1:32Virtual threads origin
  3. 3:41Traditional Java threads problems
  4. 9:14Limitations of CompletableFuture
  5. 12:27How virtual threads solve it
  6. 16:42Demo of virtual threads
  7. 23:16When not to use virtual threads
  8. 27:01Conclusion and use cases
  9. 28:37Q&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.