[python-win32] The GIL and COM

Mark Hammond skippy.hammond at gmail.com
Fri Jan 23 05:33:24 CET 2009

On 23/01/2009 4:49 AM, Brad Johnson wrote:
>> So one your thread has acquired the GIL, one of 3 things happens:
>> * It returns quickly and the GIL is released.
>> * It executes many many instructions: every 'n' instructions Python will
>> temporarily release the GIL for you.
>> * It calls some other blocking function.  This other blocking function
>> must release the GIL before blocking, then re-aquire it when it needs to
>> re-enter Python.
> You're gonna love this one, Mark. It's number 3, and it's *pywin32* May I
> present exhibit A:

> I think we have a bug.

We do indeed!  I've checked the fix into the trunk.



More information about the python-win32 mailing list