embedding pythonwin: deadlock on PyWinInterpreterLock_Acquire
Mark Hammond
mhammond at skippinet.com.au
Tue Jun 6 04:57:51 EDT 2000
*sigh* I didnt notice the CC to the list, so I replied in personal mail
:-(
"Robert Kiendl" <rkiendl at gmx.net> wrote in message
news:393BC9EA.95B2442F at gmx.net...
> 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?
The short answer is that Pythonwin/CEnterLeavePython can not handle this -
it is the responsibility of the caller (ie, the extension module author)
to ensure they release the lock that could cause a callback to in-turn
attempt to acquire it. This is already done extensively in Pythonwin,
COM, etc.
Mark.
More information about the Python-list
mailing list