]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
remove redundant call to attach_loop in watcher (#110847)
authorThomas Grainger <tagrain@gmail.com>
Sat, 14 Oct 2023 08:24:02 +0000 (01:24 -0700)
committerGitHub <noreply@github.com>
Sat, 14 Oct 2023 08:24:02 +0000 (10:24 +0200)
Lib/asyncio/unix_events.py

index 65f0923264d14efa3dfe16a19dc4b69c054bfbef..809f29eecba198294f9ef3bcbeec9a69e1d3fe59 100644 (file)
@@ -1465,8 +1465,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.