Closed jwp closed 14 years ago
void Py_AddPendingCall(int (func)(void , void *arg))
Looks promising.
Kinda sick. Py_AddPendingCall is a great tool for implementing interrupts, but I think it will still require the signal handler to be overridden..
Signal handler works better, and is generally less hacky, but nonetheless a bit discomforting as this is probably the only PLX to do so.
Py_AddPendingCall isn't the solution because it's not really designed to be chained. that is, it required that the ticker be adjusted after setting it so that it would not be immediately called again after the callback exited.
After a lot of painful debugging, the current master supports interrupts and there are tests to prove it. While working on this, it would appear that some refactoring of error.c will be necessary to better accommodate for the "it can fail here too" places. Ran into a lot of cases where CFI() got ran where I didn't expect it to. Notably, while building out errcontext() in a PG_CATCH() block.
Potential "problem" is that KeyboardInterrupt is not raised. This may need to change, but I'm not sure.
Not even sure where to begin. It will likely involve a couple mailing lists.