I'm going to reimplement this, but not for 0.16 anymore, I'd say.

-------- Original-Message --------
Betreff: Re: [cython-users] What's up with PyEval_InitThreads() in python 2.7?

Mike Cui, 28.02.2012 10:18:
>> Thanks for the test code, you hadn't mentioned that you use a "with gil"
>> block. Could you try the latest github version of Cython?
>>
> 
> Ahh, much better!
> 
>   #if CYTHON_REFNANNY
>   #ifdef WITH_THREAD
>   __pyx_gilstate_save = PyGILState_Ensure();
>   #endif
>   #endif /* CYTHON_REFNANNY */
>   __Pyx_RefNannySetupContext("callback");
>   #if CYTHON_REFNANNY
>   #ifdef WITH_THREAD
>   PyGILState_Release(__pyx_gilstate_save);
>   #endif
>   #endif /* CYTHON_REFNANNY */


Hmm, thanks for posting this - it can be further improved. There's no
reason for code bloat here, it should all just go into the
__Pyx_RefNannySetupContext() macro.

Stefan
_______________________________________________
cython-devel mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to