Completed
Making this code asynchronous the CompletableFuture API
Class Central Classrooms beta
YouTube videos curated by Class Central.
Classroom Contents
Java 21 New Feature - Virtual Threads
Automatically move to the next video in the Classroom when playback concludes
- 1 Intro
- 2 Why Virtual Threads have been added?
- 3 Analyzing the CPU usage of your blocking code
- 4 Why the "one request per thread" model cannot work
- 5 Solving this problem: less expensive threads or asynchronous code?
- 6 Introducing the asynchronous solution
- 7 Writing an imperative, blocking online shopping example
- 8 Making this code asynchronous the CompletableFuture API
- 9 Issues with the asynchronous code: debugging, testing, stack trace, exception handling, timeout handling
- 10 Making threads less expensive: by how much?
- 11 Creating and using virtual threads
- 12 How Virtual Threads are working under the hood
- 13 Running blocking code in a virtual thread
- 14 Handling native code and synchronized blocks: avoid pinning virtual threads
- 15 Wrapping up: virtual threads are cheap, blocking them is fine
- 16 Outro