We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3f443a commit 7431448Copy full SHA for 7431448
Lib/concurrent/futures/process.py
@@ -400,7 +400,7 @@ def wait_result_broken_or_wakeup(self):
400
assert not self.thread_wakeup._closed
401
wakeup_reader = self.thread_wakeup._reader
402
readers = [result_reader, wakeup_reader]
403
- worker_sentinels = [p.sentinel for p in self.processes.values()]
+ worker_sentinels = [p.sentinel for p in list(self.processes.values())]
404
ready = mp.connection.wait(readers + worker_sentinels)
405
406
cause = None
Misc/NEWS.d/next/Library/2021-04-20-14-14-16.bpo-43498.L_Hq-8.rst
@@ -0,0 +1,2 @@
1
+Avoid a possible *"RuntimeError: dictionary changed size during iteration"*
2
+when adjusting the process count of :class:`ProcessPoolExecutor`.
0 commit comments