Java 21 New Feature - Virtual Threads
Offered By: Java via YouTube
Course Description
Overview
Syllabus
Intro
Why Virtual Threads have been added?
Analyzing the CPU usage of your blocking code
Why the "one request per thread" model cannot work
Solving this problem: less expensive threads or asynchronous code?
Introducing the asynchronous solution
Writing an imperative, blocking online shopping example
Making this code asynchronous the CompletableFuture API
Issues with the asynchronous code: debugging, testing, stack trace, exception handling, timeout handling
Making threads less expensive: by how much?
Creating and using virtual threads
How Virtual Threads are working under the hood
Running blocking code in a virtual thread
Handling native code and synchronized blocks: avoid pinning virtual threads
Wrapping up: virtual threads are cheap, blocking them is fine
Outro
Taught by
Java
Related Courses
Algorithms, Part IPrinceton University via Coursera Introduction à la programmation orientée objet (en Java)
École Polytechnique Fédérale de Lausanne via Coursera MongoDB for Java Developers
MongoDB University Initiation à la programmation (en Java)
École Polytechnique Fédérale de Lausanne via Coursera Intro to Java Programming
San Jose State University via Udacity