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

Method _join_exited_workers

Lib/multiprocessing/pool.py:290–303  ·  view source on GitHub ↗

Cleanup after any worker processes which have exited due to reaching their specified lifetime. Returns True if any workers were cleaned up.

(pool)

Source from the content-addressed store, hash-verified

288
289 @staticmethod
290 def _join_exited_workers(pool):
291 """Cleanup after any worker processes which have exited due to reaching
292 their specified lifetime. Returns True if any workers were cleaned up.
293 """
294 cleaned = False
295 for i in reversed(range(len(pool))):
296 worker = pool[i]
297 if worker.exitcode is not None:
298 # worker exited
299 util.debug('cleaning up worker %d' % i)
300 worker.join()
301 cleaned = True
302 del pool[i]
303 return cleaned
304
305 def _repopulate_pool(self):
306 return self._repopulate_pool_static(self._ctx, self.Process,

Callers 1

_maintain_poolMethod · 0.80

Calls 2

debugMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected