Continuations: The magic behind virtual threads in Java
summary
Claims that Continuations power virtual threads and that a simple VirtualThread built from the Continuation API can pause, unmount and resume across carriers. Implements a scheduler (queue + fixed thread pool of platform threads), simulates blocking with a Timer that yields and later resumes a continuation, and measures scale: 2,000 virtual threads on 10 platform threads complete while the equivalent runnable-based run takes minutes (demo shows ~15 minutes). Code runs and demonstrates mounting/unmounting and higher throughput.
AI-written summary · about
chapters (7)
- 0:00Virtual threads intro
- 2:10How virtual threads work
- 9:36Understanding continuations
- 19:58Practical uses of continuations
- 27:14Building virtual thread
- 44:36Virtual threads scalability demo
- 45:17Summary
related talks
52mContinuations: The magic behind virtual threads in Java
49mEven threads are now virtual:past, present, future of concurrency in Java.
45mIntroduction and pitfalls of virtual threads
01h 00mAsynchronous Programming in Java using Virtual Threads
38mIntroduction and pitfalls of Java's new concurrency model
38mIntroduction and pitfalls of Java's new concurrency model
43mVirtual Threads: Taming the Wild Multithreading Beast
51mIntroduction and Pitfalls of Java's New Concurrency Model
