Mastering Platform Threads in Java 21 (v1.4)
Dive deep into the world of modern threading with Mastering Platform Threads in Java 21 , an advanced course designed for experienced Java developers. This hands-on program focuses on the intricacies of platform threads, leveraging new constructs introduced in Java 21 to build robust and high-performing concurrent applications.
Key Features:
- Explore Threading Models: Understand the transition from preemptive to cooperative multithreading, and how platform threads underpin Java's threading architecture.
- Concurrency Best Practices: Learn synchronization techniques, race condition management, and the Java Memory Model (JSR 133).
- Advanced Thread Management: Utilize thread builders, thread states, and inter-thread communication mechanisms to control thread lifecycle and behavior.
- Thread-Safe Designs: Implement solutions with synchronized blocks, locks, and atomic variables to ensure data integrity.
- Threading with Executors: Master the use of thread pools, including modern constructs like `Executors.newVirtualThreadPerTaskExecutor()` and its applications in concurrent programming.
- Real-World Challenges: Solve complex problems such as deadlocks, starvation, and thread contention, while adhering to best practices for scalable designs.
Who Should Attend:
This course is ideal for Java professionals who have a solid grasp of the basics of concurrency and are eager to deepen their understanding of modern threading paradigms in Java. It is especially relevant for developers working on performance-critical or multi-threaded applications. It is a good preparation for our Mastering Virtual Threads in Java Course.
Learning Outcomes:
By the end of this course, participants will be able to:
- Confidently utilize Java 21's threading enhancements in practical applications.
- Design and implement thread-safe algorithms and systems.
- Diagnose and resolve advanced concurrency issues like deadlocks and race conditions.
- Optimize resource utilization and application performance through efficient thread management.
Equip yourself with the skills to master concurrency in Java and build the next generation of scalable, reliable applications. Join us for this advanced exploration of threading and concurrency with Java 21!
Your Instructor
Heinz Kabutz is the author of The Java Specialists’ Newsletter, a publication enjoyed by tens of thousands of Java experts in over 150 countries. He has been a Java Champion since 2005.
Course Curriculum
-
Preview2. Basics of Threads (0:22)
-
Preview2.1. Multiple Processes (3:21)
-
Preview2.2. Why use threads? (1:38)
-
Preview2.3.1. Threading Models - Preemptive (1:21)
-
Preview2.3.2. Threading Models - Cooperative (1:18)
-
Preview2.3.3. Threading Models - Which one? (1:38)
-
Preview2.4.1. Parallel Computing (11:54)
-
Preview2.4.2. Concurrent Computing (1:37)
-
Preview2.5. Java Memory Model (JSR 133) (4:28)
-
Preview2.6.1. Creating new Thread (1:57)
-
Preview2.6.2. New Thread with Runnable (1:19)
-
Preview2.6.3. New Thread with Builder (0:57)
-
Start2.7. Shared memory with multithreading (5:30)
-
Start2.7.1. Synchronized (3:38)
-
Start2.7.2 Synchronized BankAccount (8:48)
-
Start2.7.3. Synchronized Methods (6:49)
-
Start2.8. Thread states (3:59)
-
Start2.9. Inter-thread communication (1:09)
-
Start2.9.1. Wait and Notify (0:38)
-
Start2.9.2. Which should we prefer? (2:18)
-
Start2.9.3. ProducerConsumer (11:07)
-
Start2.9.4. ReentrantLock and Condition (1:55)
-
Start2.9.5. ProducerConsumer using ReentrantLock (9:36)
-
Start2.9.6. AutoLock for try-with-resource (4:56)
-
Start2.10. Priorities (1:05)
-
Start2.11. Timers (1:12)
-
Start2.12. Daemon Threads (1:30)
-
Start2.13. Techniques for shutting down (2:49)
-
Start2.14.1. Exercise 2.1. Description (1:16)
-
Start2.14.1.1. Exercise 2.1. Walkthrough (7:28)
-
Start2.14.2. Exercise 2.2. Description (0:23)
-
Start2.14.2.1. Exercise 2.2. Walkthrough (6:28)
-
Start2.14.3. Exercise 2.3. Description (1:15)
-
Start2.14.3.1. Exercise 2.3. Walkthrough (23:25)
-
Start3. The Secrets of Concurrency (2:36)
-
Start3.1. The Law of the Sabotaged Doorbell (16:42)
-
Start3.2. The Law of the Distracted Spearfisherman (4:56)
-
Start3.3. The Law of the Overstocked Haberdashery (10:40)
-
Start3.4. The Law of the Blind Spot (7:36)
-
Start3.5. The Law of the Leaked Memo (24:25)
-
Start3.6. The Law of the Corrupt Politician (1:10)
-
Start3.7. The Law of the Micromanager (14:36)
-
Start3.8. The Law of Cretan Driving (7:32)
-
Start3.9. The Law of Sudden Riches (3:34)
-
Start3.10. The Law of the Uneaten Lutefisk (4:56)
-
Start3.11.1. Exercise 3.1. Description (0:22)
-
Start3.11.1.1. Exercise 3.1. Walkthrough (7:02)
-
Start3.11.2. Exercise 3.2. Description (0:33)
-
Start3.11.2.1. Exercise 3.2. Walkthrough (10:17)
-
Start3.11.3. Exercise 3.3. Description (0:14)
-
Start3.11.3.1. Exercise 3.3. Walkthrough (5:46)