Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
gh-94440: Fix issue of ProcessPoolExecutor shutdown hanging
- documentation enhancement
  • Loading branch information
yonatanp committed Jun 30, 2022
commit 5e88846c32da51a33f11ad53e5b82ca21f6a0a87
6 changes: 3 additions & 3 deletions Lib/concurrent/futures/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ def run(self):
if self.is_shutting_down():
self.flag_executor_shutting_down()

# If only canceled futures remain in pending_work_items, we
# should purge them now to avoid waiting forever in our
# subsequent call to wait_result_broken_or_wakeup.
# When only canceled futures remain in pending_work_items, our
# next call to wait_result_broken_or_wakeup would hang forever.
# This makes sure we have some running futures or none at all.
self.add_call_item_to_queue()

# Since no new work items can be added, it is safe to shutdown
Expand Down
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -1367,6 +1367,7 @@ Thomas Perl
Mathieu Perreault
Mark Perrego
Trevor Perrin
Yonatan Perry
Gabriel de Perthuis
Tim Peters
Benjamin Peterson
Expand Down