MCPcopy Index your code
hub / github.com/RustPython/RustPython / _on_sigint

Method _on_sigint

Lib/asyncio/runners.py:159–166  ·  view source on GitHub ↗
(self, signum, frame, main_task)

Source from the content-addressed store, hash-verified

157 self._state = _State.INITIALIZED
158
159 def _on_sigint(self, signum, frame, main_task):
160 self._interrupt_count += 1
161 if self._interrupt_count == 1 and not main_task.done():
162 main_task.cancel()
163 # wakeup loop if it is blocked by select() with long timeout
164 self._loop.call_soon_threadsafe(lambda: None)
165 return
166 raise KeyboardInterrupt()
167
168
169def run(main, *, debug=None, loop_factory=None):

Callers

nothing calls this directly

Calls 3

doneMethod · 0.45
cancelMethod · 0.45
call_soon_threadsafeMethod · 0.45

Tested by

no test coverage detected