~/talk

Async Showdown: Java Virtual Threads vs. Kotlin Coroutines

Talkat Heapcon 2023 · 2023-11-02..11-03· [java, kotlin]
slides:none on file

Claim: Java Virtual Threads (Java 21, Project Loom) gives thread-per-request I/O scalability without rewriting code by running many lightweight virtual threads on carrier threads, suspending on JVM blocking I/O but not inside synchronized blocks or native calls; creation uses Thread.startVirtualThread or a virtual-thread executor. Contrast: Kotlin Coroutines use compiler-generated suspending functions with user-defined suspension points and custom dispatchers. Structured and scoped APIs overlap but differ in implicit vs explicit semantics. Note: Project Reactor and Spring Boot 3.2 add Loom support; measure performance.

AI-written summary · about

  1. 0:00Introduction
  2. 0:34The problem with threads
  3. 2:18Non-blocking I/O
  4. 6:34Reactive programming
  5. 7:31Project Loom introduction
  6. 9:31Virtual threads explained
  7. 12:49Using virtual threads
  8. 16:25Performance metrics
  9. 17:44Structured concurrency
  10. 19:02Structured task scopes
  11. 22:20Scoped values
  12. 25:04Comparing to coroutines
  13. 25:26Fundamental differences
  14. 28:00Explicit vs implicit
  15. 31:34Future and summary
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.