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, giampaolo.rodola, kristjan.jonsson, loewis, pitrou
Date 2010-09-13.08:35:29
SpamBayes Score 1.0416856e-07
Marked as misclassified No
Message-id <4C8DE250.3060501@v.loewis.de>
In-reply-to <1284364831.25.0.191709368293.issue9786@psf.upfronthosting.co.za>
Content
Am 13.09.2010 10:00, schrieb Kristján Valur Jónsson:
> 
> Kristján Valur Jónsson <kristjan@ccpgames.com> added the comment:
> 
> I've changed the function as you suggest, although there are in fact no failure detection semantics defined for PyThread_create_key().  

Right. That's why I'm thinking that we should introduce some. TLS
creation *can* fail, and it is unfortunate that the original
introduction of this API forgot to consider that. Your patch did
(de facto) introduce an error return code (originally 0, now -1).
So it would be good if this was documented, and the NT version adjusted.

In principle, this is really difficult to get right. AFAICT,
pthread_key_t doesn't even have to be an integral type, and even
if it is, it may well become -1. However, we can probably worry
about this when a system comes along where this implementation
breaks.
History
Date User Action Args
2010-09-13 08:35:32loewissetrecipients: + loewis, amaury.forgeotdarc, pitrou, kristjan.jonsson, giampaolo.rodola
2010-09-13 08:35:30loewislinkissue9786 messages
2010-09-13 08:35:29loewiscreate