Multithreading vs Asynchronous Programming: The Architectural Shift
summary
Compares Java threading evolution with concrete failures and fixes: a two-thread pool example shows a pool-induced deadlock when parent tasks spawn children; ForkJoinPool and Streams (Java 8) change structure but IO plus exceptions make CompletableFuture painful — the presenter calls it completable future has no future. Demonstrates code switching Thread.start to virtual threads (Java 21), observes threads unmounting/mounting during IO and shows virtual threads let 20,000 concurrent tasks run on one machine instead of a cluster.
AI-written summary · about
chapters (14)
- 0:00Introduction to the talk
- 1:26Sequential vs concurrent code
- 3:54The pain of multithreading
- 8:53Evolution of Java threading
- 11:01Parallel vs concurrent tasks
- 14:18What is asynchronous programming
- 21:05Thread blocking and scalability
- 26:51Java 8 streams and parallelism
- 32:09CompletableFuture basics
- 36:31Challenges with CompletableFuture
- 45:59CompletableFuture pain points
- 47:25Virtual threads in Java 21
- 51:19Demo of virtual threads
- 59:57Summary of architectural shift
related talks
52mSynchronous and Asynchronous Programming - Two Worlds You Can Combine
01h 00mAsynchronous Programming in Java using Virtual Threads
47mConcurrent and Asynchronous Programming: Loom in Java 20 and 21
34mIntroduction and pitfalls of Java's new concurrency model
38mIntroduction and pitfalls of Java's new concurrency model
47mA Deeper Dive into Java Concurrency Updates
41mIntroduction and pitfalls of Java's new concurrency model
51mIntroduction and Pitfalls of Java's New Concurrency Model
