Java 21 New Feature - Virtual Threads

Java 21 New Feature - Virtual Threads

Java via YouTube Direct link

Intro

1 of 16

1 of 16

Intro

Class Central Classrooms beta

YouTube playlists 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. 1 Intro
  2. 2 Why Virtual Threads have been added?
  3. 3 Analyzing the CPU usage of your blocking code
  4. 4 Why the "one request per thread" model cannot work
  5. 5 Solving this problem: less expensive threads or asynchronous code?
  6. 6 Introducing the asynchronous solution
  7. 7 Writing an imperative, blocking online shopping example
  8. 8 Making this code asynchronous the CompletableFuture API
  9. 9 Issues with the asynchronous code: debugging, testing, stack trace, exception handling, timeout handling
  10. 10 Making threads less expensive: by how much?
  11. 11 Creating and using virtual threads
  12. 12 How Virtual Threads are working under the hood
  13. 13 Running blocking code in a virtual thread
  14. 14 Handling native code and synchronized blocks: avoid pinning virtual threads
  15. 15 Wrapping up: virtual threads are cheap, blocking them is fine
  16. 16 Outro

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.