title: Detecting a Thread is already running in C# .net?
body: <p>I am using following code.</p>
  
  <pre><code>public void runThread(){
      if (System.Diagnostics.Process.GetProcessesByName("myThread").Length == 0)
      {
      Thread t = new Thread(new ThreadStart(go));
      t.IsBackground = true;
      t.Name = "myThread";
      t.Start();
      }
      else
      {
        System.Diagnostics.Debug.WriteLine("myThreadis already Running.");
      }   
  }
  public void go()
  {
      //My work goes here
  }
  </code></pre>
  
  <p>I am calling runThread() function many time but i want thread only start when thread is not running. How is it possible?</p>