title: How to lock the MainThread in C# Application?
body: <p>How to lock the MainThread in C# Application</p>
  
  <p>Something like</p>
  
  <pre><code>lock (Thread.CurrentThread) // This will give the current running thread
  {
  // Bolck of Sync Codes
  }
  </code></pre>
  
  <p>I do have some worker Threads also .. But i need to lock the MainThread and to execute 
  some code ..</p>
  
  <p>Can anyone help me on this ..</p>