[Cython] 'with gil:' statement

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Mar 18 00:32:55 CET 2011

Dag Sverre Seljebotn wrote:

> def f():
>     with nogil:
>         for ...:
>             A
>             if something_exceptional:
>                 with gil:
>                     raise Exception(...)
>             B
>         C

If that's to be supported, the following really ought to be
supported as well:

   def f():
      with nogil:
            with gil:
               raise Exception()
            ...do some cleanup...


More information about the cython-devel mailing list