Async Showdown: Java Virtual Threads vs. Kotlin Coroutines
summary
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
chapters (9)
- 0:00Introduction and context
- 2:20The challenge of scalability
- 7:57Project Loom and virtual threads
- 11:00How virtual threads work
- 13:25Implementation and use cases
- 18:26Structured concurrency
- 22:32Scope values and thread locals
- 25:26Virtual threads vs. coroutines
- 34:03Future outlook and Q&A
related talks
50mAsync Showdown: Java Virtual Threads vs. Kotlin Coroutines
36mJava vs. Kotlin: The Ultimate Showdown of Virtual Threads & Coroutines
01h 00mAsynchronous Programming in Java using Virtual Threads
39mVirtual Threads vs. Coroutines in 2026: Is Java Finally There?
45mCoroutines and Loom behind the scenes
32mMr. Kotlin VS. Mr. Java, an inspirational parody!
43mCoroutines for Java Developers
28mConcurrency for Imposters
