Re: [Cython] 'with gil:' statement

2011-03-18 Thread mark florisson
On 18 March 2011 07:07, Stefan Behnel wrote: > Greg Ewing, 18.03.2011 01:18: >> >> mark florisson wrote: >>> >>> I think we could support it without having to acquire >>> the GIL in the finally clause. >> >> That was the intention -- the code in the finally clause would >> be subject to the same n

Re: [Cython] 'with gil:' statement

2011-03-18 Thread Stefan Behnel
mark florisson, 18.03.2011 10:52: On 18 March 2011 07:07, Stefan Behnel wrote: Greg Ewing, 18.03.2011 01:18: mark florisson wrote: I think we could support it without having to acquire the GIL in the finally clause. That was the intention -- the code in the finally clause would be subject

Re: [Cython] 'with gil:' statement

2011-03-18 Thread Dag Sverre Seljebotn
On 03/18/2011 11:10 AM, Stefan Behnel wrote: mark florisson, 18.03.2011 10:52: On 18 March 2011 07:07, Stefan Behnel wrote: Greg Ewing, 18.03.2011 01:18: mark florisson wrote: I think we could support it without having to acquire the GIL in the finally clause. That was the intention -- th

Re: [Cython] 'with gil:' statement

2011-03-18 Thread Stefan Behnel
Dag Sverre Seljebotn, 18.03.2011 12:07: On 03/18/2011 11:10 AM, Stefan Behnel wrote: Actually, I think I still find it more convenient to not provide *any* special exception paths through nogil code, i.e. to not let exceptions in "with gil" blocks exit from outer "nogil" blocks. That would avoid

Re: [Cython] 'with gil:' statement

2011-03-18 Thread mark florisson
On 18 March 2011 13:36, Stefan Behnel wrote: > Dag Sverre Seljebotn, 18.03.2011 12:07: >> >> On 03/18/2011 11:10 AM, Stefan Behnel wrote: >>> >>> Actually, I think I still find it more convenient to not provide *any* >>> special exception paths through nogil code, i.e. to not let exceptions in >>>

Re: [Cython] 'with gil:' statement

2011-03-18 Thread Stefan Behnel
Stefan Behnel, 18.03.2011 13:36: We shouldn't forget that basically all Python operations can at least raise a MemoryError or a KeyboardInterrupt etc. Most users won't think of these cases. I think it would help users in writing safer code if the need to handle exceptions in nogil blocks was alwa