This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients amaury.forgeotdarc, kristjan.jonsson, loewis, mhammond
Date 2009-01-19.22:14:20
SpamBayes Score 1.2779091e-07
Marked as misclassified No
Message-id <>
In-reply-to <>
> I understand thread-safe.  This usage is safe from Python threads 
> because it is all done in the context of the GIL.

No, it is not. See below.

> In your example, T2 doesn't hold the GIL and so, this is the scenario 
> that I believe you are invoking.

Assume that T2 is a Python thread. First, it doesn't hold the GIL.
However, when T1 releases the GIL to invoke the CRT, T2 can acquire
the GIL (which it had been waiting for, anyway), and then proceed
as described.

> Furthermore, since your argument assumes a rogue thread modifying the 
> CRT settings

No, it does not. Regular Python threads can break under this patch.
Date User Action Args
2009-01-19 22:14:21loewissetrecipients: + loewis, mhammond, amaury.forgeotdarc, kristjan.jonsson
2009-01-19 22:14:20loewislinkissue4804 messages
2009-01-19 22:14:20loewiscreate