I have the following Cython code:
cdef public int CythonfunC():
with nogil:
embeddedCFunction()
cdef extern from *:
r"""
#include <wchar.h>
#include <Python.h>
#include "cfunctions.h";
#include <tchar.h>
#include <windows.h>
int embeddedCFunction(){
//do stuff that don't require GIL
return 0;
}
PyObject *OtherFunctions(){
return PyObjectX;
}
"""
int embeddedCFunction()
The above code throws the following error: Calling gil-requiring function not allowed without gil. As suggested by some answers, I tried things such as with nogil except:, but I was not successful.
How do I release the GIL before calling embeddedCFunction?