'Poison the loop and wait for all queued work to finish this might take
some time to process.'

def join(self):

    if (not self.is_alive()):
        return
    if (not self._poison_pill_sent):
        self._poison_pill_sent = True
        self.in_queue_put(POISON_PILL)
    self.in_queue.join()
