This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Mark, terry.reedy
Date 2017-03-28.01:42:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490665370.07.0.793552851713.issue29926@psf.upfronthosting.co.za>
In-reply-to
Content
I verified on Win 10 with 3.6.1.  What system are you running on?

An automatic unittest test would be nice, but I cannot imagine how to write one.  Even a human-verified htest (IDLE private term) would  be good.  Maybe I should write a live-interaction test script.

^C is bound to pyshell.PyShell.cancel_callback.  When code is executing, this calls pyshell.ModifiedInterpreter.interrupt_subprocess.  In a new thread, this starts pyshell.ModifiedInterpreter.__request_interrupt.  I verified the calls thus far, with debug prints, while the user execution thread is sleeping.  __request_interrupt sends vua rpc ('exec', 'interrupt_the_server').

'interrupt_the_server' refers to a method of run.Executor:
       if interruptable:
            _thread.interrupt_main()

 Here I am unsure which thread this executes in and when.  Interrupting "while True: a=1" is no problem.  Does interrup_main not work while the main thread is sleeping, or does the above not get executed?
History
Date User Action Args
2017-03-28 01:42:50terry.reedysetrecipients: + terry.reedy, Mark
2017-03-28 01:42:50terry.reedysetmessageid: <1490665370.07.0.793552851713.issue29926@psf.upfronthosting.co.za>
2017-03-28 01:42:50terry.reedylinkissue29926 messages
2017-03-28 01:42:49terry.reedycreate