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):
|
for sig in list(self._signal_handlers):
|
||||||
self.remove_signal_handler(sig)
|
self.remove_signal_handler(sig)
|
||||||
else:
|
else:
|
||||||
warinigs.warn(f"Closing the loop {self!r} on interpreter shutdown "
|
if self._signal_handlers:
|
||||||
f"stage, signal unsubsription is disabled",
|
warinigs.warn(f"Closing the loop {self!r} "
|
||||||
ResourceWarning,
|
f"on interpreter shutdown "
|
||||||
source=self)
|
f"stage, signal unsubsription is disabled",
|
||||||
|
ResourceWarning,
|
||||||
|
source=self)
|
||||||
|
self._signal_handlers.clear()
|
||||||
|
|
||||||
def _process_self_data(self, data):
|
def _process_self_data(self, data):
|
||||||
for signum in data:
|
for signum in data:
|
||||||
|
|
Loading…
Reference in New Issue