Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
Handle possible bug in join
  • Loading branch information
csm10495 committed Mar 4, 2025
commit 6dec6f45f5f88dcacf96eef2fa0e88bfd40fd39d
11 changes: 9 additions & 2 deletions Lib/test/test_concurrent_futures/test_process_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,15 @@ def test_force_shutdown_workers_stops_pool(self, function_name):
# If we don't, every once in a while we may get an ENV CHANGE
# error since the process would be alive immediately after the
# test run.. and die a moment later.
worker_process.join(timeout=5)
self.assertFalse(worker_process.is_alive())
worker_process.join(5)

# Oddly enough, even though join completes, sometimes it takes a
# moment for the process to actually be marked as dead.
# ... that seems a bit buggy.
# We need it dead before ending the test to ensure it doesn't
# get marked as an ENV CHANGE due to living child process.
while worker_process.is_alive():
time.sleep(0.1)
Comment thread
csm10495 marked this conversation as resolved.
Outdated


create_executor_tests(globals(), ProcessPoolExecutorTest,
Expand Down