I'm working on providing support in mpi4py for complex types, and then
I did more or les this:

cdef class Datatype: # cdef class
    MPI_Datatype ob_mpi

cdef Datatype COMPLEX = Datatype() # cdef global

cdef void setup_complex_types() nogil: # nogil function
   cdef MPI_Datatype newtype
   create_complex_type(&newtype) # implemented elsewhere
   COMPLEX.ob_mpi = newtype # Look HERE  !

As you see, I'm touching a C field of the object structure inside a
"nogil" function.

 I'm very hapy it worked!! . AFAIK, there are no GIL issues in this
code. Anyway, I would like to know your opinion on this.

-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to