On 04/03/2010 08:40 AM, Stefan Behnel wrote:
> No need to do that. The __dealloc__ method is only called when the GIL
> is held.
It seems not. I'm not completely sure, but if I debug the generated C
code and look at the return value of an inserted `PyThreadState_GET()`,
it is 0x0 -- which is only possible if the GIL is not held properly,
isn't it?
However if I do something like
def __dealloc__(self):
self.__dealloc__with_gil__()
def __dealloc__with_gil__(self) with gil:
...
my program does not crash/receive a Segmentation fault error.
... same with __len__ and so on, is there also "guaranteed" that the GIL
is held?
Jonas
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev