bpo-30966: concurrent.futures.Process.shutdown() closes queue (GH-19738)

Process.shutdown(wait=True) of concurrent.futures now closes
explicitly the result queue.
This commit is contained in:
Victor Stinner 2020-04-27 20:53:37 +02:00 committed by GitHub
parent b94dbd7ac3
commit 1a275013d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -728,6 +728,8 @@ class ProcessPoolExecutor(_base.Executor):
# objects that use file descriptors. # objects that use file descriptors.
self._executor_manager_thread = None self._executor_manager_thread = None
self._call_queue = None self._call_queue = None
if self._result_queue is not None and wait:
self._result_queue.close()
self._result_queue = None self._result_queue = None
self._processes = None self._processes = None

View File

@ -0,0 +1,2 @@
``Process.shutdown(wait=True)`` of :mod:`concurrent.futures` now closes
explicitly the result queue.