'Puts a value into a queue but aborts if this thread is closed.'

def queue(self, queue_, value):

    while (not self.closed):
        try:
            queue_.put(value, block=True, timeout=1)
            break
        except queue.Full:
            continue
