We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40aed83 commit fd2592eCopy full SHA for fd2592e
1 file changed
tests/test_multiprocess_stability.py
@@ -122,7 +122,13 @@ def home(): return 'ok'
122
123
# Send SIGINT to parent
124
proc.send_signal(signal.SIGINT)
125
- time.sleep(3)
+
126
+ # Polling loop to wait for workers to exit (up to 15 seconds)
127
+ for _ in range(15):
128
+ alive_workers = [pid for pid in worker_pids if psutil.pid_exists(pid)]
129
+ if not alive_workers:
130
+ break
131
+ time.sleep(1)
132
133
# Check if workers are gone
134
for pid in worker_pids:
0 commit comments