Prepare for what "Loom"s ahead
summary
Demo shows a normal cached thread pool hits OOM at 16,384 platform threads while virtual threads create millions, reportedly 23 million virtual threads in 16 GB RAM and thread creation is ~30× faster. Code examples use Thread.startVirtualThread and Executors.newVirtualThreadPerTaskExecutor (auto-closeable). Loom runs virtual threads on ForkJoin carrier threads, swaps out blocked virtual threads, and uses managed blockers for native waits; caveats include synchronized/monitor issues, bias-locking changes, and expensive thread-locals and IO buffer objects.
AI-written summary · about
chapters (12)
- 0:00Start
- 0:31Why Do We Need this Project Loom
- 1:45Cache Thread Pool
- 12:20Virtual Threads
- 12:53Carrier Threads
- 14:12Green Threads
- 16:48Start Virtual Thread
- 18:10Create Virtual Threads
- 18:41Polymorphic Builder
- 19:52Executive Service
- 22:09Preview Release
- 22:50Experimental Features
related talks
51mWhat's Looming in Java The Why and What of Project Loom
49mPrepare for what “Loom”s ahead.
54mLooming in the cores
01h 00mLoom Virtual Threads in the JDK 20
47mThe Challenges of Introducing Virtual Threads to the Java Platform - Project Loom
44mLoom: Revolution or Implementation Detail?
01h 13mProject loom: Modern scalable concurrency for the Java platform
31mJava Virtual Threads
