We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8066645 commit 848ac2eCopy full SHA for 848ac2e
Lib/socketserver.py
@@ -128,7 +128,6 @@ class will essentially render the service "deaf" while one request is
128
import os
129
import sys
130
import threading
131
-import contextlib
132
from io import BufferedIOBase
133
from time import monotonic as time
134
@@ -647,11 +646,7 @@ def join(self):
647
646
thread.join()
648
649
def reap(self):
650
- dead = [thread for thread in self if not thread.is_alive()]
651
- for thread in dead:
652
- # should not happen, but safe to ignore
653
- with contextlib.suppress(ValueError):
654
- self.remove(thread)
+ self[:] = (thread for thread in self if thread.is_alive())
655
656
657
class _NoThreads:
0 commit comments