I use the following code to synchronize mutually exclusive access to a shared resource between several running processes.The mutex is created as such:\[code\]Mutex mtx = new Mutex(false, "MyNamedMutexName");\[/code\]Then I use this method to enter mutually exclusive section:\[code\]public bool enterMutuallyExclusiveSection(){ //RETURN: 'true' if entered OK, // can continue with mutually exclusive section bool bRes; try { bRes = mtx.WaitOne(); } catch (AbandonedMutexException) { //Abandoned mutex, how to handle it? //bRes = ? } catch { //Some other error bRes = false; } return bRes;}\[/code\]and this code to leave it:\[code\]public bool leaveMutuallyExclusiveSection(){ //RETURN: = 'true' if no error bool bRes = true; try { mtx.ReleaseMutex(); } catch { //Failed bRes = false; } return bRes;}\[/code\]But what happens is that if one of the running processes crashes, or if it is terminated from a Task Manager, the mutex may return \[code\]AbandonedMutexException\[/code\] exception. So my question is, what is the graceful way to get out of it? This seems to work fine:\[code\] catch (AbandonedMutexException) { //Abandoned mutex mtx.ReleaseMutex(); bRes = mtx.WaitOne(); }\[/code\]But can I enter the mutually exclusive section in that case?Can someone clarify?