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.
Log in to post a comment.