Fredrik Lundh wrote:
> Greg Chapman wrote:
>
> > Your callback function needs to hold the Python GIL (and have a
> > vaild threadstate) before it calls any Python C-API functions.
> > Change the last part of it to:
> >
> >PyGILState_STATE state;
> >
> >/* ... */
> >
> >/* Time to c
Greg Chapman wrote:
> Your callback function needs to hold the Python GIL (and have a vaild
> threadstate) before it calls any Python C-API functions. Change the
> last part of it to:
>
>PyGILState_STATE state;
>
>/* ... */
>
>/* Time to call the callback */
>
>state = PyGILState_
Travis Berg wrote:
>
> I'm running into a problem when trying to perform a callback to a
> Python function from a C extension. Specifically, the callback is
> being made by a pthread that seems to cause the problem. If I call
> the callback from the parent process, it works fine. The PyObject
I'm running into a problem when trying to perform a callback to a Python
function from a C extension. Specifically, the callback is being made by
a pthread that seems to cause the problem. If I call the callback from
the parent process, it works fine. The PyObject is static, and holds the
same