A Deeper Dive into Java Concurrency Updates
summary
Walks through concrete Java 8→9 concurrency changes with runnable demos: shows that supplyAsync defaults to the ForkJoin common pool (risking exhaustion) and how providing a custom Executor avoids it; demonstrates surprising thread hops where plain thenApply can run on the calling thread, and recommends thenCompose to avoid nested CompletableFuture types; covers Java 9 additions—orTimeout/completeOnTimeout, completeAsync/default executor via subclassing, defensive copy/minimalCompletionStage, delayed executor and SubmissionPublisher with backpressure examples that all run in live code.
AI-written summary · about
chapters (12)
- 0:00Introduction to Java concurrency
- 1:22CompletableFuture basics
- 3:24Managing thread execution
- 5:35Chaining and pipelining tasks
- 8:05Async methods and thread control
- 10:44Advanced composition techniques
- 12:27Executing multiple futures
- 15:28Exception handling patterns
- 19:14Java 9 concurrency enhancements
- 29:50Reactive streams and flow API
- 36:16Implementing subscribers and transformers
- 40:24Back pressure and conclusion
related talks
48mParallel Streams, CompletableFuture, and All That: Concurrency in Java 8
52mNew Concurrency Utilities in Java 8
28mBack to the CompletableFuture: Concurrency
50mFlavors of Concurrency in Java
48mCompletableFuture: The Promises of Java
55mBack to the CompletableFuture: Concurrency in Action
01h 01mMultithreading vs Asynchronous Programming: The Architectural Shift
56mFlavors of Concurrency in Java
