Message273916
| 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 |
<1472565198.76.0.929651616298.issue25658@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|