[Python-Dev] Issue with _thread.interrupt_main (29926) (original) (raw)
Steven D'Aprano steve at pearwood.info
Mon Mar 27 23:11:17 EDT 2017
- Previous message (by thread): [Python-Dev] Issue with _thread.interrupt_main (29926)
- Next message (by thread): [Python-Dev] Issue with _thread.interrupt_main (29926)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Mar 27, 2017 at 10:33:44PM -0400, Terry Reedy wrote:
https://bugs.python.org/issue29926 was opened as an IDLE issue, which means that most watching the new issues list would ignore it. But I think it is an issue with thread.interruptmain (which IDLE calls in respond to ^C) not interrupting time.sleep(n) in main thread*. I tested on Windows, don't know yet about OP. Since there is no Expert's Index listing for thread (or threading), I am asking here for someone who knows anything to take a look.
* >>> time.sleep(10) <hit ^C immediately> <debug print after interruptmain() shows immediately> <... remainder of 10 seconds pass> KeyboardInterrupt
I get similar behaviour under Linux. I don't have the debug print, but the KeyboardInterrupt doesn't interrupt the sleep until the 10 seconds are up.
-- Steve
- Previous message (by thread): [Python-Dev] Issue with _thread.interrupt_main (29926)
- Next message (by thread): [Python-Dev] Issue with _thread.interrupt_main (29926)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]