diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py index e608dc49f78cba..d7c0e22a7ce58d 100644 --- a/Lib/multiprocessing/connection.py +++ b/Lib/multiprocessing/connection.py @@ -1001,7 +1001,7 @@ def _exhaustive_wait(handles, timeout): return [] ready.extend(L[i] for i in res) if res: - L = L[res[0] + 1:] + L = [h for i, h in enumerate(L) if i > res[0] & i not in res] timeout = 0 while L: short_L = L[:60] if len(L) > 60 else L