git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Threading Keyboard Interrupt issue


On Thu, May 30, 2019 at 1:45 AM nihar Modi <niharmodi712 at gmail.com> wrote:
>
> I have written a simple code that involves threading, but it does not go to
> except clause after Keyboard interrupt. Can you suggest a way out. I have
> pasted the code below. It does not print 'hi' after keyboard interrupt and
> just stops.

Threads allow multiple things to run at once. The entire *point* of
spinning off a new thread is that the main code keeps going even while
the thread runs. They are independent.

ChrisA