MCPcopy Index your code
hub / github.com/python/cpython / _handle_signal

Method _handle_signal

Lib/asyncio/unix_events.py:135–143  ·  view source on GitHub ↗

Internal helper that is the actual signal handler.

(self, sig)

Source from the content-addressed store, hash-verified

133 raise
134
135 def _handle_signal(self, sig):
136 """Internal helper that is the actual signal handler."""
137 handle = self._signal_handlers.get(sig)
138 if handle is None:
139 return # Assume it's some race condition.
140 if handle._cancelled:
141 self.remove_signal_handler(sig) # Remove it properly.
142 else:
143 self._add_callback_signalsafe(handle)
144
145 def remove_signal_handler(self, sig):
146 """Remove a handler for a signal. UNIX only.

Calls 3

remove_signal_handlerMethod · 0.95
getMethod · 0.45