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

Method _internal_poll

Lib/subprocess.py:1577–1591  ·  view source on GitHub ↗

Check if child process has terminated. Returns returncode attribute. This method is called by __del__, so it can only refer to objects in its local scope.

(self, _deadstate=None,
                _WaitForSingleObject=_winapi.WaitForSingleObject,
                _WAIT_OBJECT_0=_winapi.WAIT_OBJECT_0,
                _GetExitCodeProcess=_winapi.GetExitCodeProcess)

Source from the content-addressed store, hash-verified

1575 _winapi.CloseHandle(ht)
1576
1577 def _internal_poll(self, _deadstate=None,
1578 _WaitForSingleObject=_winapi.WaitForSingleObject,
1579 _WAIT_OBJECT_0=_winapi.WAIT_OBJECT_0,
1580 _GetExitCodeProcess=_winapi.GetExitCodeProcess):
1581 """Check if child process has terminated. Returns returncode
1582 attribute.
1583
1584 This method is called by __del__, so it can only refer to objects
1585 in its local scope.
1586
1587 """
1588 if self.returncode is None:
1589 if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0:
1590 self.returncode = _GetExitCodeProcess(self._handle)
1591 return self.returncode
1592
1593
1594 def _wait(self, timeout):

Callers 3

__del__Method · 0.95
pollMethod · 0.95
_cleanupFunction · 0.80

Calls 3

_handle_exitstatusMethod · 0.95
acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected