'Only to be used during shutdown'

def __empty_queue(self):

    while True:
        try:
            self.requests.get_nowait()
        except Empty:
            break
        else:
            self.requests.task_done()
