Get up to speed with threads and concurrency in this skills-based course for advanced Java developers.
Overview
Syllabus
Introduction
- Exploring advanced topics in Java threads
- What you should know
- Exercise files
- 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
- The need for non-blocking operations
- Future
- CompletableFuture
- Implementing CompletableFuture
- Challenge: Asynchronous computations
- Solution: Asynchronous computations
- 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
- 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
- Thread safety in collections
- The need for concurrent collections
- Using concurrent collections
- Synchronized versus concurrent collections
- The need for a new concurrent programming model
- Project Loom and virtual threads
- Platform threads versus virtual threads
- 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
- Next steps
Taught by
Buddhini Samarakkody