0035-Fix-dictionary-iteration-error-in-_ExecutorManagerTh.patch 1.2 KB

1234567891011121314151617181920212223242526272829
  1. From 234364f756e3083164ec9bfcd4867855048372b4 Mon Sep 17 00:00:00 2001
  2. From: Jakub Kulik <kulikjak@gmail.com>
  3. Date: Mon, 15 Mar 2021 08:49:28 +0100
  4. Subject: [PATCH] Fix dictionary iteration error in _ExecutorManagerThread
  5. [Thomas: Taken from upstream pull request
  6. https://github.com/python/cpython/pull/24868, which is aimed at fixing
  7. https://bugs.python.org/issue43498]
  8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  9. ---
  10. Lib/concurrent/futures/process.py | 2 +-
  11. 1 file changed, 1 insertion(+), 1 deletion(-)
  12. diff --git a/Lib/concurrent/futures/process.py b/Lib/concurrent/futures/process.py
  13. index 90bc98bf2e..e3b36dff57 100644
  14. --- a/Lib/concurrent/futures/process.py
  15. +++ b/Lib/concurrent/futures/process.py
  16. @@ -373,7 +373,7 @@ class _ExecutorManagerThread(threading.Thread):
  17. assert not self.thread_wakeup._closed
  18. wakeup_reader = self.thread_wakeup._reader
  19. readers = [result_reader, wakeup_reader]
  20. - worker_sentinels = [p.sentinel for p in self.processes.values()]
  21. + worker_sentinels = [p.sentinel for p in self.processes.copy().values()]
  22. ready = mp.connection.wait(readers + worker_sentinels)
  23. cause = None
  24. --
  25. 2.20.1