Even threads are now virtual:past, present, future of concurrency in Java.
summary
Java now prototypes Project Loom virtual threads — cheap, user‑space threads that let applications create millions of virtual threads and treat blocking as inexpensive; default scheduler uses carrier threads equal to CPU cores and virtual threads mount on carriers. Examples show startVirtualThread / Thread.builder, a virtual-thread-per-task executor, ExecutorService now AutoCloseable for structured concurrency with try‑with‑resources, support and caveats for thread‑locals (can be disabled) and low‑level continuations for pause/resume.
AI-written summary · about
chapters (16)
- 0:00Intro
- 2:02Threads in Java
- 7:00Thread Groups
- 8:41Thread Local
- 11:37Threat Pools
- 15:32Asynchronous Programming
- 17:28Fork Joint Pool
- 21:02completablefuture
- 27:51Project Loom
- 29:49Virtual Threads
- 33:34Thread Locals
- 37:26Thread Factories
- 39:41Executor Services
- 41:30Scheduling
- 44:38Continuation
- 48:02Outro
related talks
53mVirtual Threads: Ushering in a New Era of Concurrency
52mJava Virtual Threads
38mIntroduction and pitfalls of Java's new concurrency model
31mJava Virtual Threads
01h 00mLoom Virtual Threads in the JDK 20
47mThe Challenges of Introducing Virtual Threads to the Java Platform - Project Loom
49mPrepare for what “Loom”s ahead.
47mConcurrent and Asynchronous Programming: Loom in Java 20 and 21
