title: Python queue block timeout does not timeout - any idea why?
body: <p>I expect the following python code will print "Timeout:" in the console output.  </p>
  
  <p>It has a thread that produce objects.  The consumer thread will get the queued objects and print it out.   </p>
  
  <p>The expected Queue Get() timeout  is not happening.  Any idea on why? </p>
  
  <p><strong>The output is: (No expected "Timeout: " printout.)</strong></p>
  
  <pre><code>1390521788.42  Outputting: o={'test': 2, 'sName': 't1'} 
  1390521791.42  Outputting: o={'test': 3, 'sName': 't1'}
  1390521794.42  Outputting: o={'test': 4, 'sName': 't1'}
  1390521797.42  Outputting: o={'test': 5, 'sName': 't1'}
  end while sName=t1 
  </code></pre>
  
  <p><strong>This is tested with Python 2.7 in Linux.</strong> </p>
  
  <pre><code>import threading, Queue, time
  
  class ProduceThread(threading.Thread):
      def __init__ (self, start_num, end, q, sName, nSleep=1):
          self.num = start_num
          self.q = q
          threading.Thread.__init__ (self)
          self.m_end = end;
          self.m_sName = sName;
          self.m_nSleep = nSleep;
  
      def run(self):
          o = {};
          o['sName'] = self.m_sName;
          while True:
              if self.num != self.m_end:
                  self.num += 1
                  o['test'] = self.num;
                  # self.q.put(self.num)
                  self.q.put(o)
                  time.sleep(self.m_nSleep)
              else:
                  break
          print "end while sName=%s" % (self.m_sName);
  
  myQueue = Queue.Queue()
  myThread = ProduceThread(1, 5, myQueue, 't1', 3); myThread.start()
  # myThread2 = ProduceThread(1, 5, myQueue, 't2', 3); myThread2.start()
  # myThread3 = ProduceThread(1, 5, myQueue, 't3', 3); myThread3.start()
  
  def Log(s):
      t = time.time();
      print "%s  %s" %(t, s)
  
  ################################################################
  #  Consumer Loop
  while True:
      if not myQueue.empty():
          try:
              o = myQueue.get(block=True, timeout=1)
              Log( "Outputting: o=%s" % (o));
          except:
              ###### I expect the Timeout to happen here. But it is not.
              Log( "Timeout: " );
              pass;
      # time.sleep(1)
  </code></pre>