title: Synchronization primitives in the .NET Framework: which one is the good one?
body: <p>I have a problem concerning the <code>System.Threading</code> Microsoft .NET namespace. In this namespace, many classes are defined in order to help me managing with threads.
  Well, I have a problem, but I do not know what to use, MSDN is vague and I still haven't got a clue of what classes do what. in particular, my problem concerns synchronization.</p>
  
  <h2>The problem</h2>
  
  <p>I have a certain number of threads (consider N threads).
  At a certain point a thread must stop and wait for at least one of the other thread to do something.
  Once one of the N - 1 threads has done a certain task, this thread notifies and the stopped thread will be able to proceed.</p>
  
  <p>So it is just a synchronization issue: a thread must wait to be signalled, that's all.</p>
  
  <h2>Many classes</h2>
  
  <p>In <code>System.Threading</code> there are many classes provided in order to handle synchronization issues. There are <code>WaitHandle</code>(s), there are <code>AutoResetEvent</code>(s), there are <code>ManualResetEvent</code>(s) and so on...</p>
  
  <p>Which one whould I use?</p>
  
  <h2>The question</h2>
  
  <p>My question is: can anybody summarize me which class I should use in order to solve my problem? Could you please tell the most important differences between these classes, or other classes?</p>
  
  <p>The point is that I havn't really understood what class is responsible of in the synchronization matter: what is the difference, for example, between a <code>WaitHandle</code> and an <code>AutoResetEvent</code> or <code>ManualResetEvent</code>?</p>
  
  <h2>What about lock?</h2>
  
  <p>In order to handle many threading issue, .net provides <code>lock</code> functionalities and the <code>Monitor</code> class. Is this couple good for my needs?</p>
  
  <p>Thankyou</p>