title: What is the significance of condition.notify() in python's threading module?
body: <p>So I'm using python's Condition from the threading module:</p>
  
  <pre><code>from threading import Thread, Condition
  condition = Condition()
  </code></pre>
  
  <p>I have a Producer class (subclass of Thread) that essentially in a for loop adds items to a queue until the queue is full (i.e. reached a defined max length) and a Consumer class that in a for loop pops items unless the queue is empty. In the Producer, if the queue is full, we have a <em>condition.wait()</em> statement, and similarly in the consumer class, if the queue is empty we have <em>a condition.wait()</em> statement. If neither of these conditions are met (queue neither full nor empty) each class do its thing (adds an item to the queue or pops an item, for Producer or Consumer respectively) and then before releasing the condition ( <em>condition.release()</em>) , we have a <em>condition.notify()</em> statement. I read from the documentation that notify()  wakes up one of the threads waiting. </p>
  
  <p>My question now is two folds: </p>
  
  <ol>
  <li>What does exactly "waking up" mean for a thread? </li>
  <li>When I removed the <em>notify()</em> statements from both classes,  my program runs just fine for few iteration of the for loops (i.e. producer pushes items and consumer pops items), and then at some point the producer keeps pushing items to the queue without consumer running, the queue gets full, but the consumer never runs again and the program just sorta halts.
  What is the significance of <em>notify()</em> that seems essential to the performance of this program.</li>
  </ol>
  
  <p>Thanks a lot for your help:)</p>