mirror of https://github.com/python/cpython
bpo-26133: Clear signals list on interpreter finalizing (#5002)
This commit is contained in:
parent
4856b0f34a
commit
4f146f9ed1
|
@ -55,10 +55,13 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
|
|||
for sig in list(self._signal_handlers):
|
||||
self.remove_signal_handler(sig)
|
||||
else:
|
||||
warinigs.warn(f"Closing the loop {self!r} on interpreter shutdown "
|
||||
f"stage, signal unsubsription is disabled",
|
||||
ResourceWarning,
|
||||
source=self)
|
||||
if self._signal_handlers:
|
||||
warinigs.warn(f"Closing the loop {self!r} "
|
||||
f"on interpreter shutdown "
|
||||
f"stage, signal unsubsription is disabled",
|
||||
ResourceWarning,
|
||||
source=self)
|
||||
self._signal_handlers.clear()
|
||||
|
||||
def _process_self_data(self, data):
|
||||
for signum in data:
|
||||
|
|
Loading…
Reference in New Issue