STINNER Victor <vstin...@python.org> added the comment:
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. ---------- nosy: +vstinner _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39465> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com