~/talk

Java Virtual Threads

links:none on file
slides:none on file

Project Loom adds virtual threads — user‑mode, lightweight Java threads that map onto carrier sets and an internal scheduler so a single process can run thousands or millions of concurrent tasks. Microbenchmarks show much lower overhead on 1,000 do‑nothing tasks and clear IO gains versus platform threads, while CPU‑bound work shows parity. A simple thread‑per‑request web server reaches throughput comparable to tuned async frameworks. Guidance: avoid pooling virtual threads, use semaphores to limit concurrency, avoid thread‑locals (experiments show 20% slowdown), and prefer java.util.concurrent locks until synchronized monitors become Loom‑friendly; structured concurrency and scoped values are preview features.

AI-written summary · about

  1. 0:00Introduction to Project Loom
  2. 2:06The problem with Java threads
  3. 4:43Understanding virtual threads
  4. 8:03Virtual threads performance
  5. 10:27IO and CPU benchmarks
  6. 12:07Real world applications
  7. 13:47Helidon Nima framework
  8. 15:28Little's Law and utilization
  9. 19:14Migration and best practices
  10. 21:33Thread locals and scoped values
  11. 24:07Understanding thread pinning
  12. 27:23Future Loom improvements
  13. 28:34Structured concurrency
~/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.