imp icon indicating copy to clipboard operation
imp copied to clipboard

Investigate getting good interrupt support in native code

Open drussel opened this issue 11 years ago • 2 comments

When in C++ code called from python, interrupt doesn't work. This is annoying, and really bad with Ipython.

drussel avatar Oct 28 '13 17:10 drussel

Best lead so far: You may want to call intrcheck() or PyErr_CheckSignals in your C code and react accordingly.

From what I can see, PyErr_CheckSignals() returns 0 if no interrupt occurred and -1 (setting a KeyboardInterrupt exception) if one did.

drussel avatar Oct 28 '13 22:10 drussel

Or http://stackoverflow.com/questions/2510696/allowing-threads-from-python-after-calling-a-blocking-i-o-code-in-a-python-exten

drussel avatar Oct 28 '13 22:10 drussel