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 <4974FB3A.70809@v.loewis.de>
In-reply-to <1232387121.18.0.400542036598.issue4804@psf.upfronthosting.co.za>
Content
> 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.
History
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