[Pyrex] [Cython-dev] Callbacks from threads and PyGILState_Ensure/PyGILState_Release

Ulisses Furquim ulisses.silva at openbossa.org
Thu Sep 13 17:35:47 CEST 2007


Hi,

On 9/13/07, Stefan Behnel <stefan_ml at behnel.de> wrote:
>
> Robert Bradshaw wrote:
> > Back to the question of whether or not signatures match, I see only two
> > instance where we care about types matching.
> >
> > 1) Between pyx and pxd files. If we allow them to differ, which takes
> > precedence? It only benefits the lazy to allow mismatch here.
>
> I don't think so. As I already said, we are not talking about interfaces here,
> only about implementation details. If I define a function in a .pxd file
> without annotating it with "with GIL", but then I implement such a function
> and say that I want it to execute "with GIL", that can be perfectly
> reasonable. I don't see much sense in the opposite, but maybe I'm just missing
> something.

I agree and I don't think you're missing anything (or maybe I am too :-).

> How about disallowing "with GIL" in .pxd files and in function
> pre-declarations? That way, we avoid the problem all together.

That might be a good idea.

-- Ulisses



More information about the Pyrex mailing list