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 erik.bray
Recipients EdSchouten, erik.bray, r.david.murray, vstinner
Date 2016-08-30.13:53:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Here's a first stab at a patch for this.  A linked list is maintained which maps pthread_key_t instances to an int "key_id" that is used for the PyThread API.  Each function needs to map a given key_id to the actual pthread_key_t.  This adds a little bit of overhead of course, but in typical usage I don't think there are many entries in this list to loop over.

This also reverts the change from #22206 which is no longer relevant.  No synchronization is provided for PyThread_create_key and PyThread_delete_key, but in typical usage that would be the user's responsibility anyways.  Otherwise every PyThread_*_key function would have to have a mutex around it.
Date User Action Args
2016-08-30 13:53:18erik.braysetrecipients: + erik.bray, vstinner, r.david.murray, EdSchouten
2016-08-30 13:53:18erik.braysetmessageid: <>
2016-08-30 13:53:18erik.braylinkissue25658 messages
2016-08-30 13:53:18erik.braycreate