[EMAIL PROTECTED] wrote: > I'm trying to write an extension in C that delivers callbacks to > Python. The C code starts several threads, and I'd like one of the new > threads that is started to be able to deliver callbacks to Python. I > thought I could do this by wrapping the callback function in > PyGILState_Ensure / PyGILState_Release. When I do this, the Python code > in the callback in between those two calls certainly works, but when > PyGILState_Release is called, the process dies with a bus error!
The fine folks on the Pyrex list figured out the problem: PyEval_InitThreads() needs to be called somewhere before any of the threading calls are made. For a fixed version of my test program, please see the Pyrex list archives. thanks, Geoff Schmidt gschmidt [[a t]] gschmidt [[d o t]] org (send correspondence here, not the address in the header) -- http://mail.python.org/mailman/listinfo/python-list