diff options
-rw-r--r-- | Lib/concurrent/futures/process.py | 2 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2020-04-27-20-27-39.bpo-30966.Xmtlqu.rst | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Lib/concurrent/futures/process.py b/Lib/concurrent/futures/process.py index 36355ae..8e9b69a 100644 --- a/Lib/concurrent/futures/process.py +++ b/Lib/concurrent/futures/process.py @@ -728,6 +728,8 @@ class ProcessPoolExecutor(_base.Executor): # objects that use file descriptors. self._executor_manager_thread = None self._call_queue = None + if self._result_queue is not None and wait: + self._result_queue.close() self._result_queue = None self._processes = None diff --git a/Misc/NEWS.d/next/Library/2020-04-27-20-27-39.bpo-30966.Xmtlqu.rst b/Misc/NEWS.d/next/Library/2020-04-27-20-27-39.bpo-30966.Xmtlqu.rst new file mode 100644 index 0000000..85b7934 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-04-27-20-27-39.bpo-30966.Xmtlqu.rst @@ -0,0 +1,2 @@ +``Process.shutdown(wait=True)`` of :mod:`concurrent.futures` now closes +explicitly the result queue. |