'Called by the test thread. Wait at a waitpoint called name'

def waitpoint(self, name):

    with self.wait_lock:
        wait_since = time.time()
        while (name == self.wait_at):
            self.waiting = True
            self.wait_lock.notify_all()
            self.wait_lock.wait(1)
            assert ((time.time() - wait_since) < MAX_WAIT)
        self.epoch += 1
        self.waiting = False
        self.wait_lock.notify_all()
