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

Skip to content

Commit 4c2f35f

Browse files
committed
PR feedback on looping for process death
1 parent 4edea15 commit 4c2f35f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_concurrent_futures/test_process_pool.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,9 @@ def test_force_shutdown_workers_stops_pool(self, function_name):
334334
# ... that seems a bit buggy.
335335
# We need it dead before ending the test to ensure it doesn't
336336
# get marked as an ENV CHANGE due to living child process.
337-
while worker_process.is_alive():
338-
time.sleep(0.1)
337+
for _ in support.sleeping_retry(support.SHORT_TIMEOUT):
338+
if not worker_process.is_alive():
339+
break
339340

340341

341342
create_executor_tests(globals(), ProcessPoolExecutorTest,

0 commit comments

Comments
 (0)