[Cython] Poll: Buffer access exception under nogil
Stefan Behnel
stefan_ml at behnel.de
Tue Apr 14 21:13:19 CEST 2009
Hi,
just a quick note on this:
Andrew Collette wrote:
> void HDF5_read_data(...) except -1
> [...]
> try:
> with nogil:
> HDF5_read_data(...)
> finally:
> ... some cleanup ...
>
> Importantly, if the function HDF5_read_data is declared "except *",
> Cython immediately crashes if an exception is raised
It shouldn't allow you to do that at all. I assume you declared the
function "nogil" to call it in a "with nogil" block. Combining "nogil" with
exception handling should raise an error at compile time.
There may be cases where this rule could potentially be relaxed, but the
compiler should catch this early in any case.
Stefan
More information about the Cython-dev
mailing list