[Cython] 'with gil:' statement

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Mar 16 23:42:11 CET 2011


> On 03/16/2011 01:55 PM, mark florisson wrote:
> 
>> but it doesn't catch this:
>>
>> cdef void func() nogil:
>>      with nogil:
>>          pass
>>
>> with nogil:
>>      func()

I would say that in that case, func() should acquire the
gil on entry so that it can be released in the 'with nogil'
block.

Either that or find some way to generate code that tests
whether the gil is currently held and releases it if it
is.

-- 
Greg


More information about the cython-devel mailing list