Imagine you are waiting for a call from your girlfriend with whom you had an argument. She too is waiting for you to call her and apologise. In other words, both of you are waiting for the other to call. Now if no one takes the phone and calls the other, you will never talk again. This is a deadlock and in this article we will see how deadlock occurs in programming and how to prevent it.
↧