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

Method is_alive

Lib/multiprocessing/process.py:160–177  ·  view source on GitHub ↗

Return whether process is alive

(self)

Source from the content-addressed store, hash-verified

158 _children.discard(self)
159
160 def is_alive(self):
161 '''
162 Return whether process is alive
163 '''
164 self._check_closed()
165 if self is _current_process:
166 return True
167 assert self._parent_pid == os.getpid(), 'can only test a child process'
168
169 if self._popen is None:
170 return False
171
172 returncode = self._popen.poll()
173 if returncode is None:
174 return True
175 else:
176 _children.discard(self)
177 return False
178
179 def close(self):
180 '''

Callers 11

__del__Method · 0.45
__exit__Method · 0.45
get_n_children_aliveMethod · 0.45
_force_shutdownMethod · 0.45
joinMethod · 0.45
_finalize_managerMethod · 0.45
_help_stuff_finishMethod · 0.45
_terminate_poolMethod · 0.45
stopMethod · 0.45
exitcodeMethod · 0.45
active_childrenFunction · 0.45

Calls 3

_check_closedMethod · 0.95
pollMethod · 0.45
discardMethod · 0.45

Tested by

no test coverage detected