]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] remove redundant call to attach_loop in watcher (GH-110847) (#110870)
authorThomas Grainger <tagrain@gmail.com>
Sun, 15 Oct 2023 14:51:13 +0000 (07:51 -0700)
committerGitHub <noreply@github.com>
Sun, 15 Oct 2023 14:51:13 +0000 (14:51 +0000)
(cherry picked from commit 596589104fe5a4d90cb145b2cc69b71cc9aa9f07)

Lib/asyncio/unix_events.py

index ac4519acc4307bee85c4d02773d28df11c4f6edb..0d4ba72603e675b5467b9ac08af0318eeceb4ba0 100644 (file)
@@ -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.