'Indicate that a thread will start putting into this queue.
Should not be called after the queue is already poisoned.'

def acquire(self):

    with self.mutex:
        assert (not self.poisoned)
        assert (self.nthreads >= 0)
        self.nthreads += 1
