(self, sig)
Internal helper that is the actual signal handler.
Internal helper that is the actual signal handler.
Internal helper that is the actual signal handler .
def _handle_signal(self, sig):
        """Internal helper that is the actual signal handler."""
        handle = self._signal_handlers.get(sig)
        if handle is None:
            return  # Assume it's some race condition.
        if handle._cancelled:
            self.remove_signal_handler(sig)  # Remove it properly.
        else:
            self._add_callback_signalsafe(handle)
def _handle_signal ( self , sig ) : handle = self . _signal_handlers . get ( sig ) if handle is None : return # Assume it's some race condition. if handle . _cancelled : self . remove_signal_handler ( sig ) # Remove it properly. else : self . _add_callback_signalsafe ( handle )