On 08/18/2011 09:06 AM, Stefan Behnel wrote:
Dag Sverre Seljebotn, 18.08.2011 08:39:
The semantics are simple: For all cdef functions, if "nogil" could have
been applied without a syntax error, then it gets automatically applied.
The only time this isn't completely safe is when the GIL is intentionally
being used as a lock.
In which case, IMHO, it's actually a good idea to require an explicit
declaration, because it makes this intention explicitly visible in the
source code.
I take it that auto-nogil semantics for a function wouldn't
automatically *release* the GIL. They'd just not require it, right? So
Right. Sorry about not making it clearer earlier.
all that would change is that you wouldn't get a compiler error when
calling such a function without holding the GIL.
That shouldn't break all that much code...
Happy that we agree!
Dag Sverre
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel