Java Concurrency
Learn about the concepts, practices and APIs to understand, write and manage concurrent applications in Java. Master the core concurrency concepts and wield Java concurrency APIs like a pro
Agenda
FREE PREVIEWBefore we begin...
What are threads?
What is a process?
Process vs threads
Threads in a Java app
Understanding Thread and Runnable
Thread - Syntax alternatives
Practical usage of the Thread API
Daemon threads
Understanding Thread Life cycle
Coding with Thread States
Sleep and the InterruptedException
Joining threads
Stopping a Thread
Implementing thread interrupt and join
Parallelism vs Concurrency
The Need for Synchronization
Common Race Condition Patterns
Solving Race Conditions
Using synchronization
Monitors, mutex and structured locking
Problems with mutual exclusion
Liveness - deadlocks, livelocks and starvation
The volatile keyword
Understanding thread local
Unstructured locks and the lock object
The Lock interface
The executor service
Fixed thread pool
Thread pool and Executor types
Coding with various ExecutorServices
Using a Callable
The Future object
Coding with Futures and Callables
Other methods on Future and Callables
Using Completable Futures
Semaphores
Understanding fork join
Coding with fork join