mark florisson wrote:

Have we ever thought about supporting 'with gil' as an actual
statement instead of just as part of a function declaration or
definition?

That's the way I was originally going to do it in Pyrex, but
it turned out to be problematic, because there is some setup
that gets done on entering a function -- increfing parameters,
initialising locals to None, etc. -- that is needed in order
to support Python operations being done anywhere in the function.

Allowing for a 'with gil' block would require deferring those
things until entering the block, and making sure nothing is done
outside the block that relies on them. Probably not impossible,
but it would require some extensive rearrangements.

--
Greg
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to