~/talk

Async Showdown: Java Virtual Threads vs. Kotlin Coroutines

Talkat Voxxed Days Luxembourg 2023 · 2023-06-21..06-22· [java, kotlin]
slides:none on file

Project Loom’s virtual threads arrive in JDK 21: virtual threads production-ready with carrier threads that schedule many lightweight virtual threads, suspension on standard java blocking I/O (not synchronized or native), and guidance to treat them as cheap one‑offs rather than pooled resources; structured concurrency and scope values remain preview features. Kotlin coroutines still use compiler‑generated continuations — continuations make coroutines a state machine — so suspending is cheaper there, coroutines are cross‑platform, and the tradeoff is implicit (virtual threads) vs explicit (suspend) concurrency control.

AI-written summary · about

  1. 0:00Introduction to async
  2. 1:38Thread per request issues
  3. 5:00Non-blocking I/O solutions
  4. 8:58Introduction to Project Loom
  5. 10:45Virtual threads architecture
  6. 15:27Suspension and blocking
  7. 18:42Using virtual threads
  8. 22:30Structured concurrency
  9. 26:26Scoped values in Java
  10. 32:02Kotlin coroutines internals
  11. 37:43Comparing concepts
  12. 41:03Explicit vs implicit APIs
  13. 47:02Q&A and future outlook
~/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.