[Cython] 'with gil:' statement

mark florisson markflorisson88 at gmail.com
Wed Mar 16 15:29:16 CET 2011


On 16 March 2011 15:07, Stefan Behnel <stefan_ml at behnel.de> wrote:
> mark florisson, 16.03.2011 13:28:
>>
>> On 16 March 2011 13:01, mark florisson wrote:
>>>>>
>>>>> Another feedback is that I wonder whether we should put the "gil" and
>>>>> "nogil" psuedo-context managers both in cython namespace, and sort of
>>>>> deprecate the "global" nogil, rather than introduce yet another name
>>>>> that
>>>>> can't be used safely for all kinds of variables.
>>>>
>>>> Hmm, good catch. Actually, 'with cython.nogil:' is already possible,
>>>> but cython.gil isn't (in fact, 'with cython.somethingrandom:' seems to
>>>> simply be ignored).
>>>> So I guess I'll have to fix that :)
>>>>
>>>
>>> I attached a patch for 'with cython.gil:'.
>
> Looks ok.

Does that mean I should push the changes, or do you want some more
elaborate reviewing first?

>
>> Attached a patch to disallow invalid directives in with statements.
>
> +1, except that I'd print the directive name as part of the error message.
>
> Stefan
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> http://mail.python.org/mailman/listinfo/cython-devel
>


More information about the cython-devel mailing list