8000 Don't create a new list · python/cpython@f161daa · GitHub
[go: up one dir, main page]

Skip to content

Commit f161daa

Browse files
committed
Don't create a new list
1 parent d414ed2 commit f161daa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/asyncio/unix_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,8 +1381,8 @@ def _join_threads(self, timeout=None):
13811381
thread.join(timeout)
13821382

13831383
# 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]
1384+
self.threads[:] = [thread for thread in list(self._threads.values())
1385+
if thread.is_alive() and not thread.daemon]
13861386

13871387
def __enter__(self):
13881388
return self

0 commit comments

Comments
 (0)
0