by joining all queues and processes when shutdown() is called.
# some multiprocessing.Queue methods may deadlock on Mac OS X.
for p in processes.values():
p.join()
+ # Release resources held by the queue
+ call_queue.close()
while True:
_add_call_item_to_queue(pending_work_items,
# Clean shutdown of a worker using its PID
# (avoids marking the executor broken)
assert shutting_down()
- del processes[result_item]
+ p = processes.pop(result_item)
+ p.join()
if not processes:
shutdown_worker()
return
ThreadPoolAsCompletedTests,
FutureTests,
ProcessPoolShutdownTest,
- ThreadPoolShutdownTest)
+ ThreadPoolShutdownTest,
+ )
finally:
test.support.reap_children()
Library
-------
+- Fix potential resource leaks in concurrent.futures.ProcessPoolExecutor
+ by joining all queues and processes when shutdown() is called.
+
- Issue #11603: Fix a crash when __str__ is rebound as __repr__. Patch by
Andreas Stührk.