embedding pythonwin: deadlock on PyWinInterpreterLock_Acquire

Robert Kiendl rkiendl at gmx.net
Mon Jun 5 11:40:26 EDT 2000


I've got a problem with CEnterLeavePython,
PyWinInterpreterLock_Acquire/Release (build 128):

windows messages come into python via CEnterLeavePython.
C-code (swig) is called from some python message handlers. 
and this C-code sometimes implicitly sends windows messages which again
flow into python via CEnterLeavePython. Thereby
PyWinInterpreterLock_Acquire crashes with a "PyEval_AcquireThread:
non-NULL old thread state"

shouldn't there be code in PyWinInterpreterLock_Acquire/Release to take
care if the same windows thread just does a recursion Win -> Python -> C
(->Win) -> Python. 
or am I completely wrong?

robert



More information about the Python-list mailing list