remove redundant call to attach_loop in watcher (#110847)

This commit is contained in:
Thomas Grainger 2023-10-14 01:24:02 -07:00 committed by GitHub
parent 4110cfec12
commit 596589104f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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