Introduction
Exploring advanced topics in Java threads
()
What you should know
()
Exercise files
()
1. Synchronization
Memory access in Java threads and its problems
()
Memory inconsistency: Data race
()
Thread interference: Race condition
()
Synchronization: Purpose and use
()
Implementing synchronization
()
Challenge: Inventory manager
()
Solution: Inventory manager
()
2. Asynchronous Programming
The need for non-blocking operations
()
Future
()
CompletableFuture
()
Implementing CompletableFuture
()
Challenge: Asynchronous computations
()
Solution: Asynchronous computations
()
3. Executors
Managing thread execution: Thread pools and executors
()
ExecutorService
()
Implementing an executor: ExecutorService in action
()
Executing tasks periodically with ScheduledExecutorService
()
Challenge: Number magic and voting simulator
()
Solution: Number magic and voting simulator
()
4. Fork/Join Framework
Thread execution and the fork/join framework
()
Worker threads and work stealing
()
The core classes of the fork/join framework
()
Using the fork/join framework
()
Challenge: Multiples calculator
()
Solution: Multiples calculator
()
5. Concurrent Data Structures
Thread safety in collections
()
The need for concurrent collections
()
Using concurrent collections
()
Synchronized versus concurrent collections
()
6. Introduction to Project Loom
The need for a new concurrent programming model
()
Project Loom and virtual threads
()
Platform threads versus virtual threads
()
7. Virtual Threads in Action
Ways to create virtual threads
()
Comparing performance: Platform versus virtual threads
()
Benefits of using virtual threads
()
Things to keep in mind when using virtual threads
()