From fd1b314cd3fc58e9155306e2d907492ed272c567 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sun, 15 Oct 2023 07:51:13 -0700 Subject: [3.11] remove redundant call to attach_loop in watcher (GH-110847) (#110870) (cherry picked from commit 596589104fe5a4d90cb145b2cc69b71cc9aa9f07) --- Lib/asyncio/unix_events.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py index ac4519a..0d4ba72 100644 --- a/Lib/asyncio/unix_events.py +++ b/Lib/asyncio/unix_events.py @@ -1443,8 +1443,6 @@ class _UnixDefaultEventLoopPolicy(events.BaseDefaultEventLoopPolicy): with events._lock: if self._watcher is None: # pragma: no branch self._watcher = ThreadedChildWatcher() - if threading.current_thread() is threading.main_thread(): - self._watcher.attach_loop(self._local._loop) def set_event_loop(self, loop): """Set the event loop. -- cgit v0.12