Message273916
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:18 | erik.bray | set | recipients:
+ erik.bray, vstinner, r.david.murray, EdSchouten |
2016-08-30 13:53:18 | erik.bray | set | messageid: <1472565198.76.0.929651616298.issue25658@psf.upfronthosting.co.za> |
2016-08-30 13:53:18 | erik.bray | link | issue25658 messages |
2016-08-30 13:53:18 | erik.bray | create | |
|