[Cython] Poll: Buffer access exception under nogil

Stefan Behnel stefan_ml at behnel.de
Tue Apr 14 22:47:17 CEST 2009


Hi,

please don't top-post.

Andrew Collette wrote:
> Well, the function signature in question is (in the referred file h5d.pyx):
> 
> "cdef int H5PY_H5Dread(<stuff>) nogil except -1"
> 
> which compiles just fine... is this going to stop working?

I think this is the one case where exception propagation will easily work
in a nogil block. If we get the exception propagation semantics right here,
we can leave this in. But it's not entirely clear (at least to me) if this
currently behaves 'correctly'.

It *might* be possible to enable the same for "except *" somehow, but until
then, Cython should raise an error at compile time rather than letting the
code crash at runtime.

Stefan



More information about the Cython-dev mailing list