'Called by the control thread. Cause the test thread to run until
reaching a waitpoint called name. When runto() exits, the test
thread is guaranteed to have reached this waitpoint.'

def runto(self, name):

    with self.wait_lock:
        self.wait_at = name
        self.wait_lock.notify_all()
        self._ensure_running()
        wait_since = time.time()
        while ((self.epoch == self.last_epoch) or (not self.waiting)):
            self.wait_lock.wait(1)
            assert ((time.time() - wait_since) < MAX_WAIT)
        self.last_epoch = self.epoch
