Continuations and Fibers: The New Frontier for Java
summary
Project Loom introduces continuations as a data structure (Continuation/ContinuationScope and yield/run) and virtual threads/fibers so IO waits suspend a task not the OS thread; a demo shows 4,000 native threads run but 5,000 triggers OOM, while virtual threads report true and resume correctly. Examples mirror JavaScript generators and Kotlin coroutines, target HTTP/DB/file IO, and claim millions of JVM threads are feasible, cutting servers and keeping code single-threaded in practice.
AI-written summary · about
chapters (8)
- 0:00Introduction to Project Loom
- 6:37Limitations of traditional threads
- 12:55What are continuations?
- 21:31Parallel vs concurrent execution
- 30:29How fibers improve scalability
- 41:06Use cases for continuations
- 51:17Virtual threads in Project Loom
- 58:07Future of Java with continuations
related talks
43mProject Loom: Fibers and Continuations for the Java Virtual Machine
51mWhat's Looming in Java The Why and What of Project Loom
42mProject Loom Update
53mFruits of the Loom – Lightweight Concurrency For the Java Platform
50mProject Loom: Helping Write Concurrent Applications on the Java Platform
44mLoom: Revolution or Implementation Detail?
35mUntangled: Sneak peek at Project Loom
47mConcurrent and Asynchronous Programming: Loom in Java 20 and 21
