aibolit
aibolit copied to clipboard
Interrupt signal doesn't work
When I send interrupt signal with Ctrl+C
CLI shows a lot of errors with stacktraces but doesn't stop.
Seems it doesn't work since we have multiprocess inside python. We need to investigate it, how to stop all child processes
There is a bug in python: https://bugs.python.org/issue8296
It seems there are two issues that make exceptions while multiprocessing annoying. The first is that you need to use map_async with a timeout instead of map in order to get an immediate response (i.e., don't finish processing the entire list). The second is that multiprocessing doesn't catch exceptions that don't inherit from Exception (e.g., SystemExit).
https://stackoverflow.com/a/23682499