def wait(self, timeout=None):
        watch = timeutils.StopWatch(duration=timeout)
        watch.start()
        with self._cond:
            while self._count > 0:
                if watch.expired():
                    return False
                else:
                    self._cond.wait(watch.leftover(return_none=True))
            return True
Waits until the latch is released.
dataset/ETHPy150Open openstack/taskflow/taskflow/types/latch.py/Latch.wait