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

Method _check_alive

Lib/multiprocessing/resource_tracker.py:255–264  ·  view source on GitHub ↗

Check that the pipe has not been closed by sending a probe.

(self)

Source from the content-addressed store, hash-verified

253 self._write(msg)
254
255 def _check_alive(self):
256 '''Check that the pipe has not been closed by sending a probe.'''
257 try:
258 # We cannot use send here as it calls ensure_running, creating
259 # a cycle.
260 os.write(self._fd, self._make_probe_message())
261 except OSError:
262 return False
263 else:
264 return True
265
266 def register(self, name, rtype):
267 '''Register name of resource with resource tracker.'''

Calls 2

_make_probe_messageMethod · 0.95
writeMethod · 0.45