title: Parallel patterns supported specifically by AutoResetEvent
body: <p><a href="http://msdn.microsoft.com/en-us/library/system.threading.autoresetevent.aspx" rel="nofollow">msdn AutoResetEvent</a>.</p>
  
  <p><strong>question</strong> </p>
  
  <p>What parallel pattern fits best around an AutoResetEvent?</p>
  
  <p><strong>background</strong></p>
  
  <p>When comparing options for synchronization between threads we might compare <code>AutoResetEvent</code> to <code>ManualResetEvent</code>. Consider these two distinctions:</p>
  
  <ol>
  <li>AutoResetEvent releases at most one waiting thread.</li>
  <li>AutoResetEvent resets <em>automatically</em> after one waiting thread is released.</li>
  </ol>
  
  <p>It is important to note that if two threads are waiting and an <code>AutoResetEvent</code> fires twice, it is possible for a race condition to occur and only one thread is released. More locks could be used to protect from this condition - but the focus of the question is about what pattern <code>AutoResetEvent</code> does best (and perhaps this implies, what pattern it supports best on its own).</p>