From 247ac3d310c6217684c1fbe7ea3f78e1d31b4147 Mon Sep 17 00:00:00 2001 From: NewUserHa <32261870+NewUserHa@users.noreply.github.com> Date: Fri, 17 Jan 2025 08:55:47 +0800 Subject: [PATCH] Update proactor_events.py --- Lib/asyncio/proactor_events.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py index 7eb55bd63ddb73..1d60544556e873 100644 --- a/Lib/asyncio/proactor_events.py +++ b/Lib/asyncio/proactor_events.py @@ -628,7 +628,6 @@ class BaseProactorEventLoop(base_events.BaseEventLoop): def __init__(self, proactor): super().__init__() - logger.debug('Using proactor: %s', proactor.__class__.__name__) self._proactor = proactor self._selector = proactor # convenient alias self._self_reading_future = None @@ -638,6 +637,8 @@ def __init__(self, proactor): if threading.current_thread() is threading.main_thread(): # wakeup fd can only be installed to a file descriptor from the main thread signal.set_wakeup_fd(self._csock.fileno()) + if self._debug: + logger.debug('Using proactor: %s', proactor.__class__.__name__) def _make_socket_transport(self, sock, protocol, waiter=None, extra=None, server=None):