[3.12] remove redundant call to attach_loop in watcher (GH-110847) (#110867)

(cherry picked from commit 596589104f)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
This commit is contained in:
Miss Islington (bot) 2023-10-14 12:27:08 +02:00 committed by GitHub
parent 9786959a11
commit 0c56c05022
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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.