A Tale of Two Cities: How Blocking Calls Are Treated?
Talkat JCON Europe 2023 · on Thursday, 2023-06-22· at 10:00· Cinema 6, Im Mediapark 1, 50670 Köln, Germany·
summary
Walks through Java threading history, shows why OS threads cost time and memory (about 2 MB stack per OS thread), and why executors, Future/Callable, CompletableFuture and reactive stacks tried to work around blocking. Demonstrates Project Loom’s virtual threads (introduced as preview in JDK 19, finalized in JDK 21) and a live run that creates ~8 million virtual threads, explains how each virtual thread yields from its carrier OS thread when blocking, restoring simple imperative code and removing thread‑pool tuning.
AI-written summary · about
chapters (26)
- 0:00Introduction to talk
- 0:22Blocking vs asynchronous programming
- 1:04Talk agenda and Project Loom
- 2:06Why Java is popular
- 2:49Threads as execution environments
- 3:54Creating threads in Java
- 5:21Thread limitations and costs
- 6:03Modern web app thread usage
- 7:48Thread creation failure scenarios
- 8:55Problems with blocking calls
- 10:00Thread blocking impact on throughput
- 12:48Sequential vs parallel processing
- 14:15Java 5 and thread pools
- 15:40Thread pool improvements
- 17:53Challenges with reactive programming
- 21:14Readability and debugging issues
- 24:51Project Loom introduction
- 25:55Virtual threads explained
- 28:47Virtual thread demo setup
- 29:07Virtual thread creation demo
- 31:39How virtual threads work
- 34:10Virtual threads benefits
- 37:00Advantages of virtual threads
- 38:26Code comparison demo
- 40:17Frameworks supporting virtual threads
- 40:40Closing remarks and Q&A
related talks
51mJava 21: The revolution of virtual threads
49mEven threads are now virtual:past, present, future of concurrency in Java.
49mPrepare for what “Loom”s ahead.
46mJava 21: The revolution of virtual threads - A Deep dive
50mAsynchronous Programming in Java using Virtual Threads
51mWhat's Looming in Java The Why and What of Project Loom
47mThe Challenges of Introducing Virtual Threads to the Java Platform - Project Loom
47mConcurrent and Asynchronous Programming: Loom in Java 20 and 21
