Showing posts with label concurrency. Show all posts
Showing posts with label concurrency. Show all posts

February 8, 2014

Simple Java Deadlock Example Explained


There are several good Java deadlock examples on the internet. I tried to write the simplest example which is readable and also executable. I used the deadlock example in the Java Tutorial, which I had to re-write, because it did not always produced a deadlock when executed with JUnit: