Deadlock with Loader Lock and GIL
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
FormatMessage could implicit load libraries to read resource strings for the message formatting. For this the windows DLL loader lock is acquired. In an multithreaded application which makes use of native an Python threads a deadlock could happen if these two locks (Loader Lock, GIL) are acquired in wrong order. This fix releases the GIL before a call to FormatMessage is made.
Patch to fix loader lock GIL problem.
This patch looks fine, but could you please remove the lines like "// code changed by ssc" - source control can tell us that (and if you upload a patch from a mercurial queue, you will be directly attributed for the change)
Thanks!
I provided a patch in the patch queue with the changes suggested.