'I had to create this method in order to be able to quickly end the
discovery phase from within the same thread.'

def _force_end(self):

    while (not self.in_queue.empty()):
        self.in_queue.get()
        self.in_queue.task_done()
    self.out_queue.put(POISON_PILL)
