Skip to content

Commit 3b4975a

Browse files
committed
Comment on _UnixSelectorEventLoop.close() logic
1 parent bc7b849 commit 3b4975a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/asyncio/unix_events.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ def __init__(self, selector=None):
6565
self._signal_handlers = {}
6666

6767
def close(self):
68+
# remove signal handlers first to verify
69+
# the loop's signal handling setup has not
70+
# been tampered with
6871
if not sys.is_finalizing():
6972
for sig in list(self._signal_handlers):
7073
self.remove_signal_handler(sig)

0 commit comments

Comments
 (0)