Exemplo n.º 1
0
 def wait_while_listening(self, timeout=None):
     """Wait until no longer listening for incoming messages."""
     with self._connlock:
         lock = self._listening
         if lock is None:
             raise RuntimeError('not listening yet')
     _util.lock_wait(lock, timeout)  # Wait until no longer listening.
Exemplo n.º 2
0
 def _wait_until_exiting(self, timeout):
     lock = self._exitlock
     if lock is None:
         return
     try:
         _util.lock_wait(lock, timeout, 'waiting for process exit')
     except _util.TimeoutError as exc:
         warnings.warn(str(exc))
Exemplo n.º 3
0
 def wait_while_connected(self, timeout=None):
     """Wait until the client socket is disconnected."""
     with self._connlock:
         lock = self._listening
     _util.lock_wait(lock, timeout)  # Wait until no longer connected.