Message361041
Once I discussed with Eric Snow during a core developer sprint: _Py_IDENTIFIER() should use an "interpreter local storage" for identifiers values. _Py_IDENTIFIER() would only be a "key" and _PyUnicode_FromId() would store the value somewhere in a hash table stored in PyInterpreterState. Something similar to the TSS API:
* PyThread_create_key()
* PyThread_delete_key_value()
* PyThread_set_key_value()
* PyThread_get_key_value()
But per interpreter, rather than being per thread.
The key can be simply the variable address in memory. It only has to be unique in the process. |
|
Date |
User |
Action |
Args |
2020-01-30 11:35:23 | vstinner | set | recipients:
+ vstinner, ncoghlan, petr.viktorin, eric.snow, shihai1991 |
2020-01-30 11:35:23 | vstinner | set | messageid: <1580384123.04.0.474591840811.issue39465@roundup.psfhosted.org> |
2020-01-30 11:35:23 | vstinner | link | issue39465 messages |
2020-01-30 11:35:22 | vstinner | create | |
|