I don't understand this behavior:
static Mutex Mut;
static void Main(string[] args)
{
try
{
Mut = System.Threading.Mutex.OpenExisting("testmut");
}
catch
{
Mut = new Mutex(true, "testmut");
}
Mut.WaitOne();
Thread.Sleep(4000);
Mut.ReleaseMutex();
}
Starting two instances of this application simultaneously will cause the second application to get an Abandoned Mutex Exception after the first process terminates. Why? I did explicitly release the mutex before terminating there in the first process.