I think only the main thread receives `KeyboardInterrupt`, so you need a way to know when the process has been interrupted