Re: [Cython] Calling gil-requiring function not allowed without gil

2011-08-17 Thread Dag Sverre Seljebotn
On 08/18/2011 08:39 AM, Dag Sverre Seljebotn wrote: On 08/17/2011 09:21 PM, Robert Bradshaw wrote: On Wed, Aug 17, 2011 at 11:46 AM, Dag Sverre Seljebotn wrote: On 08/17/2011 08:19 PM, Robert Bradshaw wrote: That's a nice idea. I have to admit that all these special gil declarations are a bi

Re: [Cython] Calling gil-requiring function not allowed without gil

2011-08-17 Thread Stefan Behnel
Robert Bradshaw, 17.08.2011 20:19: I have to admit that all these special gil declarations are a bit messy. I'd also rather introduce clear decorators, e.g. @cython.requires_gil # expects gil cdef a(): ... @cython.requires.gil(False) # nogil cdef b(): ... @cython.aquires_gil # with gil cdef

Re: [Cython] Calling gil-requiring function not allowed without gil

2011-08-17 Thread Dag Sverre Seljebotn
On 08/17/2011 09:21 PM, Robert Bradshaw wrote: On Wed, Aug 17, 2011 at 11:46 AM, Dag Sverre Seljebotn wrote: On 08/17/2011 08:19 PM, Robert Bradshaw wrote: That's a nice idea. I have to admit that all these special gil declarations are a bit messy. I'd also rather introduce clear decorators,

Re: [Cython] What now?

2011-08-17 Thread Stefan Behnel
Stefano, 11.08.2011 16:24: now that I've nailed Cython code, I'd like to get into something more funny. Currently, I'm working on a set of macros to seamlessy integrate Cython into CMake build process (in fact, I love CMake). But, I'd like to work also on something more essential, so... Here's

Re: [Cython] Calling gil-requiring function not allowed without gil

2011-08-17 Thread Robert Bradshaw
On Wed, Aug 17, 2011 at 11:46 AM, Dag Sverre Seljebotn wrote: > On 08/17/2011 08:19 PM, Robert Bradshaw wrote: >> >> That's a nice idea. I have to admit that all these special gil >> declarations are a bit messy. I'd also rather introduce clear >> decorators, e.g. >> >> @cython.requires_gil  # exp

Re: [Cython] Calling gil-requiring function not allowed without gil

2011-08-17 Thread Dag Sverre Seljebotn
On 08/17/2011 08:19 PM, Robert Bradshaw wrote: That's a nice idea. I have to admit that all these special gil declarations are a bit messy. I'd also rather introduce clear decorators, e.g. @cython.requires_gil # expects gil cdef a(): ... @cython.requires.gil(False) # nogil cdef b(): ... @cyth

Re: [Cython] Calling gil-requiring function not allowed without gil

2011-08-17 Thread Robert Bradshaw
On Wed, Aug 17, 2011 at 1:08 AM, Dag Sverre Seljebotn wrote: > On 08/17/2011 09:12 AM, Robert Bradshaw wrote: >> So your proposal is that "with cython.synchronized" has the same >> effect as a Python operation, in that its a compile time error to do >> it while not holding the gil? (As opposed to

Re: [Cython] Calling gil-requiring function not allowed without gil

2011-08-17 Thread Dag Sverre Seljebotn
On 08/17/2011 09:12 AM, Robert Bradshaw wrote: On Fri, Aug 12, 2011 at 6:13 AM, Dag Sverre Seljebotn wrote: On 08/12/2011 02:45 PM, Stefan Behnel wrote: [second try in moving this discussion to cython-devel] Dag Sverre Seljebotn, 12.08.2011 08:50: On 08/12/2011 06:44 AM, Robert Bradshaw wro

Re: [Cython] [cython-users] Calling gil-requiring function not allowed without gil

2011-08-17 Thread Robert Bradshaw
On Fri, Aug 12, 2011 at 6:13 AM, Dag Sverre Seljebotn wrote: > On 08/12/2011 02:45 PM, Stefan Behnel wrote: >> [second try in moving this discussion to cython-devel] >> >> Dag Sverre Seljebotn, 12.08.2011 08:50: >>> On 08/12/2011 06:44 AM, Robert Bradshaw wrote: On Thu, Aug 11, 2011 at 5:53 A