]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] remove redundant call to attach_loop in watcher (GH-110847) (#110867)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 14 Oct 2023 10:27:08 +0000 (12:27 +0200)
committerGitHub <noreply@github.com>
Sat, 14 Oct 2023 10:27:08 +0000 (12:27 +0200)
(cherry picked from commit 596589104fe5a4d90cb145b2cc69b71cc9aa9f07)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Lib/asyncio/unix_events.py

index f985f9776ed0aa8b6854d7b0b5b5921e19f4cb73..0a618c42d2d257658bb573f1e2199fbf8fc981b0 100644 (file)
@@ -1461,8 +1461,6 @@ class _UnixDefaultEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
                     self._watcher = PidfdChildWatcher()
                 else:
                     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.