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 4d2cc3e commit 4b11d71Copy full SHA for 4b11d71
Lib/concurrent/futures/process.py
@@ -373,7 +373,7 @@ def wait_result_broken_or_wakeup(self):
373
assert not self.thread_wakeup._closed
374
wakeup_reader = self.thread_wakeup._reader
375
readers = [result_reader, wakeup_reader]
376
- worker_sentinels = [p.sentinel for p in self.processes.values()]
+ worker_sentinels = [p.sentinel for p in list(self.processes.values())]
377
ready = mp.connection.wait(readers + worker_sentinels)
378
379
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