mirror of https://github.com/python/cpython
bpo-43498: Fix dictionary iteration error in _ExecutorManagerThread (GH-24868)
This commit is contained in:
parent
b3f443a35e
commit
7431448b81
|
@ -400,7 +400,7 @@ class _ExecutorManagerThread(threading.Thread):
|
|||
assert not self.thread_wakeup._closed
|
||||
wakeup_reader = self.thread_wakeup._reader
|
||||
readers = [result_reader, wakeup_reader]
|
||||
worker_sentinels = [p.sentinel for p in self.processes.values()]
|
||||
worker_sentinels = [p.sentinel for p in list(self.processes.values())]
|
||||
ready = mp.connection.wait(readers + worker_sentinels)
|
||||
|
||||
cause = None
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Avoid a possible *"RuntimeError: dictionary changed size during iteration"*
|
||||
when adjusting the process count of :class:`ProcessPoolExecutor`.
|
Loading…
Reference in New Issue