title: Mutexes with the same name
body: <p>I'm relatively new to C# programming and some days ago, I came across the term <code>mutex</code>. It was used in the sense of avoiding running multiple instances of the same application. I was actually reading a book on WPF (using C#, of course) so there was no deep explanation on C# (the author wrote it for people with sufficient knowledge of C#).<br>
  It was used in this form:</p>
  
  <pre><code>Mutex mutex;
  // ...
  
  // Check for existing instance
  string mutexName = "MyCompanyName.MyAppName";
  bool createdNew;
  mutex = new Mutex(true, mutexName, out createdNew);
  
  // If there is an existing instance, shut down this one
  if(!createdNew) { Shutdown(); }
  </code></pre>
  
  <p>My explanation of a mutex is that it is sort of a system-wide type. All single-instance applications access all mutexes in a system to prevent multiple instances. Also. a mutex should have a unique <code>name</code>. (Of course, I stand to be corrected; that's my own explanation so it could be wrong).</p>
  
  <p>Suppose there happens to be a mutex named <code>"mutexConflict"</code> created by an application A while another application B (which was created by a completely different author) has its own mutex also named <code>"mutexConflict"</code>. If A is already running and B is about to be run, isn't there supposed to be a conflict? Will B run?</p>