Prepare for what “Loom”s ahead.
summary
Demonstration shows Java 19 preview virtual threads cut a simple web-render pipeline from 4.3s (sequential) to ~4.1s with futures, ~1.9s with CompletableFutures and ~0.5s with virtual threads by spawning per-task virtual threads via startVirtualThread or a virtual-thread-per-task executor. Project Loom supports millions of virtual threads (~<1KB each) scheduled on carrier (ForkJoin) threads, but warns: thread locals discouraged, synchronized+wait can block carriers, deadlocks become harder to diagnose (need -Djdk.track.threads). Structured concurrency is still incubating.
AI-written summary · about
chapters (24)
- 0:00Introduction and gratitude
- 1:52What is Project Loom
- 3:42Why virtual threads are needed
- 4:24Demo sequential processing
- 6:33Demo async with Future
- 8:39Demo CompletableFuture approach
- 12:59Demo one thread per task
- 15:46Virtual threads solve scaling issues
- 19:37Fundraiser offer for Devox Ukraine
- 21:45Virtual threads in Java 19
- 24:13Creating virtual threads
- 27:44Unstructured concurrency
- 29:51Structured concurrency plans
- 31:19ForkJoinPool and managed blocking
- 33:34Changes in socket APIs
- 35:19Synchronized and waiting issues
- 36:23Biased locking and thread locals
- 38:30Thread states and IDs
- 40:40Memory overhead of streams
- 41:43Debugging deadlocks
- 44:35When to retrofit code
- 45:18Back pressure with virtual threads
- 46:21Java 19 preview status
- 47:24Q&A session
related talks
47mConcurrent and Asynchronous Programming: Loom in Java 20 and 21
31mJava Virtual Threads
51mWhat's Looming in Java The Why and What of Project Loom
53mVirtual Threads: Ushering in a New Era of Concurrency
37mPrepare for what "Loom"s ahead
47mThe Challenges of Introducing Virtual Threads to the Java Platform - Project Loom
01h 00mLoom Virtual Threads in the JDK 20
01h 13mProject loom: Modern scalable concurrency for the Java platform
