def wait(self, timeout):
    self._check_owned()
    self._check_unnotified()

    self._nwaiters += 1
    try:
      if self._read_fd is None:
        (self._read_fd, self._write_fd) = os.pipe()

      wait_fn = self._waiter_class(self._read_fd)
      state = self._release_save()
      try:
        # Wait for notification
        wait_fn(timeout)
      finally:
        # Re-acquire lock
        self._acquire_restore(state)
    finally:
      self._nwaiters -= 1
      if self._nwaiters == 0:
        self._Cleanup()
When called with L{NewsBuilder._MISC}, L{NewsBuilder._findChanges}
dataset/ETHPy150Open ganeti/ganeti/lib/locking.py/SingleNotifyPipeCondition.wait--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/python/test/test_release.py/NewsBuilderTests.test_findMiscellaneous