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 dbbad2d commit 85b79b2Copy full SHA for 85b79b2
Lib/asyncio/unix_events.py
@@ -1381,8 +1381,8 @@ def _join_threads(self, timeout=None):
1381
thread.join(timeout)
1382
1383
# Clear references to terminated threads
1384
- self._threads[:] = [thread for thread in list(self._threads.values())
1385
- if thread.is_alive() and not thread.daemon]
+ self._threads = {key: thread for key, thread in self._threads.items()
+ if thread.daemon or thread.is_alive()}
1386
1387
def __enter__(self):
1388
return self
0 commit comments