JGym.IO Live - Mastering Threads - 12-13 January 2021
We live in an age of an increasing need for high speed computing. We can no longer wait for faster CPUs. To push computers to their limits, we must harness the power of parallel and concurrent computing. But we must do this correctly and safely, and to do so, we need a deep understanding of the concepts. And lots of practice!
We start on day 1 with the basics of threads and jump in at the deep end by writing a thread pool. We march deeper into the labyrinth, looking at the Secrets of Concurrency: the laws that help us to write correct threaded code. Our journey continues on day 2 with the higher-level constructs that make threading much easier to use. This leads us on to diagnosing race conditions, deadlocks and other threading problems.
This course includes two live sessions of 4 hours each on the 12th to 13th of January 2021 with Dr Heinz M. Kabutz. Each pattern has exercises to solve. Heinz shows model solutions and is always happy to answer your questions.
What you'll learn - and how you can apply it
- Correct use of the synchronized keyword
- How to communicate between threads using signals
- How to correctly manage thread interruptions
- Visibility of data between threads
- Higher-level constructs such as ThreadPoolExecutor, CompletionService and various synchronizers
- Detecting and solving threading issues
How do these LIVE classes work?
Our LIVE classes consist of two 4-hour sessions. They are highly interactive, with exercises, discussions, and walkthroughs of the solutions. Sessions are not recorded. We welcome questions at any time during the live session.
Each 4-hour session runs from 7am to 11am Los Angeles Time.
Once you enrol in this course, we will sign you up for the webinar. Our system will send you login details. These are personal to you so please do not share them (otherwise you might lose access to the course).
LIVE Class Calendar
- Welcome to the course and how to get the most from your learning
1: Basics of Threads
- Why Use Threads?
- Threading Models
- Parallel Computing vs Concurrent Computing
- Java Memory Model (JSR 133)
- Creating New Threads
- Shared Memory with Multithreading
- Thread States
- Inter-thread Communication
- Exercise writing a thread pool and learning how inter-thread communication is done
2: The Secrets of Concurrency
- Sabotaged Doorbell
- Distracted Spearfisherman
- Overstocked Haberdashery
- Blind Spot
- Leaked Memo
- Corrupt Politician
- Cretan Driving
- Sudden Riches
- Uneaten Lutefisk
- Exercise improving the inter-thread communication by fixing the handling of the InterruptedException
3: Applied Threading Techniques
- Callable and Future
- Unhandled Exceptions
- Stopping Threads
- Shutdown Hooks
- Exercise refactoring our thread pool to use blocking queues for inter-thread communication
4: Threading Problems
- Race Conditions
- Analyzing Thread Dumps
- Exercises to detect and fix race conditions and deadlocks
- Course wrap-up and next steps
- This training is for intermediate to advanced Java programmers wanting to learn how threading works in Java.
- Students should download and install the exercises found in the Resources chapter of the course material
- "Java Concurrency in Practice" by Brian Goetz
Get started now!
Heinz Kabutz is the author of The Java Specialists’ Newsletter, a publication enjoyed by tens of thousands of Java experts in over 145 countries. His book “Dynamic Proxies (in German)” was #1 Bestseller on Amazon.de in Fachbücher für Informatik for about five minutes until Amazon fixed their algorithm. Thanks to a supportive mother, he has now sold 5 copies.
Heinz’s Java Specialists’ newsletter is filled with amusing anecdotes of life on the Island of Crete. He is a popular speaker at all the best Java conferences around the world, and also at some of the worst. He teaches Java courses in classrooms around the world, where his prime objective is to make absolutely sure that none of his students fall asleep. He is not always successful.