mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
asyncio: Add close() back to Unix selector event loop, to remove all signal handlers. Should fix buildbot issues.
This commit is contained in:
parent
79ed4c744a
commit
0b69fbc642
2 changed files with 21 additions and 0 deletions
|
@ -48,6 +48,11 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
|
|||
def _socketpair(self):
|
||||
return socket.socketpair()
|
||||
|
||||
def close(self):
|
||||
for sig in list(self._signal_handlers):
|
||||
self.remove_signal_handler(sig)
|
||||
super().close()
|
||||
|
||||
def add_signal_handler(self, sig, callback, *args):
|
||||
"""Add a handler for a signal. UNIX only.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue