~/talk

Async Showdown: Java Virtual Threads vs. Kotlin Coroutines

Talkat Voxxed Days Thessaloniki 2023 · 2023-11-24..11-25· [java, kotlin]
slides:none on file

Java 21 virtual threads are production-ready and let a blocking-IO JVM app run like non‑blocking code by mapping many lightweight virtual threads onto a small pool of carrier threads; stacks are on-heap and cost hundreds of bytes instead of ~1MB per platform thread. Structured concurrency and scope values are preview features. Kotlin coroutines remain useful for multiplatform work and for explicit suspending functions and richer primitives; combining is practical by supplying a virtual-thread executor as a Coroutine dispatcher, but CPU-bound work still needs traditional thread pools and DB access requires connection pooling.

AI-written summary · about

  1. 0:00Introduction and context
  2. 2:20The challenge of scalability
  3. 7:57Project Loom and virtual threads
  4. 11:00How virtual threads work
  5. 13:25Implementation and use cases
  6. 18:26Structured concurrency
  7. 22:32Scope values and thread locals
  8. 25:26Virtual threads vs. coroutines
  9. 34:03Future outlook and Q&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.