Visitar URL original
bpo-19675: Terminate processes if construction of a pool is failing. by JulienPalard · Pull Request #5614 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge remote-tracking branch 'upstream/master' into bpo-19675
# Conflicts:
#	Lib/multiprocessing/pool.py
  • Loading branch information
taleinat committed Nov 4, 2018
commit 7670d4a0309648ec48b64bc3d1471ef95362ea33
16 changes: 8 additions & 8 deletions Lib/multiprocessing/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,17 +252,17 @@ def _repopulate_pool_static(ctx, Process, processes, pool, inqueue,
"""Bring the number of pool processes up to the specified number,
for use after reaping workers which have exited.
"""
for i in range(self._processes - len(self._pool)):
w = self.Process(target=worker,
args=(self._inqueue, self._outqueue,
self._initializer,
self._initargs, self._maxtasksperchild,
self._wrap_exception)
)
for i in range(processes - len(pool)):
w = Process(ctx, target=worker,
args=(inqueue, outqueue,
initializer,
initargs, maxtasksperchild,
wrap_exception)
)
w.name = w.name.replace('Process', 'PoolWorker')
w.daemon = True
w.start()
self._pool.append(w)
pool.append(w)
util.debug('added worker')

@staticmethod
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.