title: What will happen if a thread dies inside the critical section?
body: <p>This is the scenario. We have lots of thread accessing a section of code that is protected by a critical section, which ensures that only one thread at a time will gain access to that part. Now the question is, what will happen if a thread dies inside the critical section? Will the application hang? or there is some way that lock will be released? </p>