aibolit icon indicating copy to clipboard operation
aibolit copied to clipboard

Interrupt signal doesn't work

Open g4s8 opened this issue 4 years ago • 3 comments

When I send interrupt signal with Ctrl+C CLI shows a lot of errors with stacktraces but doesn't stop.

g4s8 avatar Jul 24 '20 11:07 g4s8

Seems it doesn't work since we have multiprocess inside python. We need to investigate it, how to stop all child processes

lyriccoder avatar Jul 24 '20 11:07 lyriccoder

There is a bug in python: https://bugs.python.org/issue8296

lyriccoder avatar Jul 31 '20 09:07 lyriccoder

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

lyriccoder avatar Jul 31 '20 09:07 lyriccoder