Code review comment for lp:~spiv/bzr/sigwinch-without-signalmodule-583941

Revision history for this message
Andrew Bennetts (spiv) wrote :

John A Meinel wrote:
[...]
> I didn't read the code, but could you do what you need with ctypes
> instead of writing a custom extension?

I don't think so. Although ctypes allows you to define a Python
function for a C function prototype, I wouldn't expect that to be safe
to use as a signal handler. It would presumably attempt to run the
Python function whenever the signal arrived, without taking any care
about already being mid-way through the ceval loop, or garbage
collection, or the GIL being held by a different thread, etc.

« Back to merge proposal