Every Call to “EnterCriticalSection” Needs a Matching “LeaveCriticalSetcion”
Threads can hang indefinitely if one thread is Entered in a critical section but returned without Leaving it. There is a simple solution to make sure that this doesn’t happen.