From: Thomas Grainger Date: Sat, 14 Oct 2023 08:24:02 +0000 (-0700) Subject: remove redundant call to attach_loop in watcher (#110847) X-Git-Tag: v3.13.0a2~468 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=596589104fe5a4d90cb145b2cc69b71cc9aa9f07;p=thirdparty%2FPython%2Fcpython.git remove redundant call to attach_loop in watcher (#110847) --- diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py index 65f0923264d1..809f29eecba1 100644 --- a/Lib/asyncio/unix_events.py +++ b/Lib/asyncio/unix_events.py @@ -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.