MCPcopy Index your code
hub / github.com/RustPython/RustPython / _wait

Method _wait

Lib/subprocess.py:1594–1609  ·  view source on GitHub ↗

Internal implementation of wait() on Windows.

(self, timeout)

Source from the content-addressed store, hash-verified

1592
1593
1594 def _wait(self, timeout):
1595 """Internal implementation of wait() on Windows."""
1596 if timeout is None:
1597 timeout_millis = _winapi.INFINITE
1598 elif timeout <= 0:
1599 timeout_millis = 0
1600 else:
1601 timeout_millis = int(timeout * 1000)
1602 if self.returncode is None:
1603 # API note: Returns immediately if timeout_millis == 0.
1604 result = _winapi.WaitForSingleObject(self._handle,
1605 timeout_millis)
1606 if result == _winapi.WAIT_TIMEOUT:
1607 raise TimeoutExpired(self.args, timeout)
1608 self.returncode = _winapi.GetExitCodeProcess(self._handle)
1609 return self.returncode
1610
1611
1612 def _readerthread(self, fh, buffer):

Callers 3

__exit__Method · 0.95
communicateMethod · 0.95
waitMethod · 0.95

Calls 9

_try_waitMethod · 0.95
_handle_exitstatusMethod · 0.95
_remaining_timeMethod · 0.95
_timeFunction · 0.90
TimeoutExpiredClass · 0.85
minFunction · 0.85
acquireMethod · 0.45
releaseMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected