Concurrency

The Most Common Concurrency Issues and How to Fix Them: Part 3

Jonatan Ivanov

In the first part of the series, I showed you a simple class which has three concurrency issues. In the second one, I explained the first issue: Race Condition. In this post, I would like to explain the rest of them. By the end of the series, you will understand their basic mechanism, you will be able to identify them and I will give you a couple of advice on how to fix them.

I wrote a few tests to demonstrate two of the issues, the third one is tough, please let me know if you have any idea how can it be tested. I’m also interested if you have any ideas for improvements for the existing tests because…
…well, keep reading and you will see. :)

The Most Common Concurrency Issues and How to Fix Them: Part 1

Jonatan Ivanov

The goal of this example-driven series of articles is explaining, demonstrating, and testing (the fun part) the two most frequent (in my opinion) concurrency mistakes in Java (plus an interesting third one), also giving you a few suggestions to fix them.

By the end of the series, you will understand their basic mechanism, you will be able to identify them and I will give you a couple of advice on how to fix them.