Using WITH_FREE_THREAD to avoid PyEval_AcquireThread error

btheld2 at my-deja.com btheld2 at my-deja.com
Thu Feb 1 23:42:31 CET 2001


I am having some problems with a PyEval_AcquireThread error.  I have an
extension DLL (created using SWIG).  A Python callback function in this
dll is calling a COM function.  This COM function is creating a new
Document in my MDI MFC Application.  When this occurs I get an
PyEval_AcquireThread error (Null thread?).

After digging through the code, it appears that a pre-processor
directive (WITH_FREE_THREAD) may solve this problem.  I just tried
defining this and rebuilding python, but the system cannot find
threadstate.h.

So, Is this a solution?  If not, what is?  If so, where is the
threadstate.h file?

Ben


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list