title: Python threading: will Event.set() really notify every waiting thread
body: <p>If I have a <code>threading.Event</code> and the following two lines of code:</p>
  
  <pre><code>event.set()
  event.clear()
  </code></pre>
  
  <p>and I have some threads who are waiting for that event.</p>
  
  <p>My question is related to what happens when calling the <code>set()</code> method:</p>
  
  <ul>
  <li>Can I be ABSOLUTELY sure that all the waiting thread(s) will be notified? (i.e. <code>Event.set()</code> "notifies" the threads)</li>
  <li>Or could it happen that those two lines are executed so quickly after each other, that some threads might still be waiting? (i.e. <code>Event.wait()</code> polls the event's state, which might be already "cleared" again)</li>
  </ul>
  
  <p>Thanks for your answers!</p>