Open manrajgrover opened 6 years ago
In this case, if you type spinner.stop()
(doesn't saw but it is kept handling) and press Enter
, the spinner stops. But I think you want a more elegant solution.
To solve this problem, we capture KeyboardInterrupt
signal, pass to the thread and stop a task immediately. One of the solutions is to implement specific thread class inherited thread.Thread
like this. Second is to using signal
module. In this way code is more clear and much better but there are maybe platform-specific issues.
I used the second way to solve the problem. Please review my method.
@ManrajGrover Can I send a PR for review?
@JungWinter I would need a little more time to review the methods. Apologies for the delay.
With reference to #38, adding test case seems to fail on Appveyor. Need to find the reason behind this.
Description
Currently, in an iPython notebook, if a user does not handle keyboard interrupt and the spinner is running, a
KeyboardInterrupt
is thrown but the spinner keeps spinning.System settings
Error
Expected behaviour
Steps to recreate
Following snippet should recreate the error.
People to notify
@ManrajGrover