'Get an item from the requeue.
Args:
block: Whether to block if the requeue is empty.
timeout: Maximum on how long to wait until the requeue is non-empty.
Returns:
An item from the requeue.
Raises:
Queue.Empty if the queue is empty and the timeout expires.'

def get(self, block=True, timeout=None):

    def GetAction():
        try:
            result = self.requeue.get(block=False)
            self.requeue.task_done()
        except Queue.Empty:
            result = self.queue.get(block=False)
        return result
    return self._DoWithTimeout(GetAction, Queue.Empty, self.put_cond, self.get_cond, self.lock, timeout=timeout, block=block)
