MCPcopy Index your code
hub / github.com/python/cpython / _wait

Method _wait

Lib/subprocess.py:1648–1663  ·  view source on GitHub ↗

Internal implementation of wait() on Windows.

(self, timeout)

Source from the content-addressed store, hash-verified

1646
1647
1648 def _wait(self, timeout):
1649 """Internal implementation of wait() on Windows."""
1650 if timeout is None:
1651 timeout_millis = _winapi.INFINITE
1652 elif timeout <= 0:
1653 timeout_millis = 0
1654 else:
1655 timeout_millis = int(timeout * 1000)
1656 if self.returncode is None:
1657 # API note: Returns immediately if timeout_millis == 0.
1658 result = _winapi.WaitForSingleObject(self._handle,
1659 timeout_millis)
1660 if result == _winapi.WAIT_TIMEOUT:
1661 raise TimeoutExpired(self.args, timeout)
1662 self.returncode = _winapi.GetExitCodeProcess(self._handle)
1663 return self.returncode
1664
1665
1666 def _readerthread(self, fh, buffer):

Callers 3

__exit__Method · 0.95
communicateMethod · 0.95
waitMethod · 0.95

Calls 9

_wait_pidfdMethod · 0.95
_wait_kqueueMethod · 0.95
_try_waitMethod · 0.95
_handle_exitstatusMethod · 0.95
_remaining_timeMethod · 0.95
TimeoutExpiredClass · 0.85
acquireMethod · 0.45
releaseMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected