Hacker News new | ask | show | jobs
by Spivak 813 days ago
I mean you can just have the signal handler throw StopRequested in your Python boilerplate and never think about it again.

One common pattern is raising KeyboardInterrupt from your handler so it's all handled the same.