~/talk

Java 21: The Revolution of Virtual Threads - A Deep Dive

Talkat JCON WORLD ONLINE 2023 · on Wednesday, 2023-11-22· at 17:00· Live-Stream 3, Online - Remote· [java, concurrency]
slides:none on file

Live code shows Java 21 virtual threads replacing reactive rewrites: a blocking Spring Boot REST that OOMs when spawning 1 million platform threads runs fine with virtual threads, JMeter tests with 1,000 concurrent users hold ~1s latency and the JVM only uses ~45 OS worker threads. Demo uses Spring Boot (3.2 RC with spring.threads.virtual.enabled=true), Thread.sleep-simulated I/O, and structured task scopes to run per-speaker HTTP calls in parallel, cutting 10× serial latency to ~1.5s. Notes pinning in synchronized/native calls and preview status for scopes.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:07Building blocks of the talk
  3. 7:55Platform threads limitations
  4. 10:26Reactive programming overview
  5. 17:52Problems with reactive approach
  6. 19:18Project Loom and virtual threads
  7. 26:40Enabling virtual threads in Spring Boot
  8. 29:52Virtual threads vs blocking performance
  9. 30:54Structured task scopes explained
  10. 34:47Simplifying structured task scopes
  11. 39:49Thread locals and synchronized blocks
  12. 42:39Virtual threads restrictions
  13. 43:01Conclusion and future outlook
  14. 44:27Q&A session
~/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.