Comment 0 for bug 138963

Revision history for this message
scoder (scoder) wrote :

Ulisses Furquim wrote a patch that implements a syntax extension to grab and release the GIL when entering and leaving a function. This is handy as Cython tends to run INCREFs before the start of the user code, so there is currently no way to surround function code with a GIL context - except for writing a separate pass-through wrapper function. The patch avoids this overhead.

The discussion on the mailing list that lead to the current implementation is here:

http://comments.gmane.org/gmane.comp.python.cython.devel/18