It is essentially an extension of this question - Usage of threadpoolexecutor in conjunction with cython's nogil
In this case my getArea2() method is slightly different
cdef int getArea2(self,double[:] p) nogil:
cdef int area
cdef SphericalPoint spoint
spoint = SphericalPoint()
area = 0
area = self.rect.getArea()
return area
and the .pxd declaration is slightly different
cdef extern from "Point.h":
cdef cppclass SphericalPoint(Point):
SphericalPoint() except +
double getCoordinate1()
double getCoordinate2()
void setCoordinate1(double lat)
void setCoordinate2(double lon)
With this I am getting these compilation errors. Any reason why the instantiation of the object is incorrect ?
I tried making spoint as a pointer and instantiating the object and it gives me the same error
cdef SphericalPoint *spoint
spoint = new SphericalPoint()
Error compiling Cython file:
cdef int getArea2(self,double[:] p) nogil:
cdef int area
cdef SphericalPoint spoint
spoint = SphericalPoint()
^
------------------------------------------------------------
test.pyx:78:30: Calling gil-requiring function not allowed without gil