Update of the EXPERIMENTAL_ISOLATED_SUBINTERPRETERS status.
I made many free lists and singletons per interpreter in bpo-40521.
TODO:
* _PyUnicode_FromId() and interned strings are still shared: typeobject.c requires a workaround for that.
* GC is disabled in subinterpreters since some objects are still shared
* Type method cache is shared.
* pymalloc is shared.
* The GIL is shared.
I'm investigating performance of my _PyUnicode_FromId() PR: https://github.com/python/cpython/pull/20058
This PR now uses "atomic functions" proposed in a second PR: https://github.com/python/cpython/pull/20766
The "atomic functions" avoids the need to have to declare a variable or a structure member as atomic, which would cause different issues if they are declared in Python public headers (which is the case for _Py_Identifier used by _PyUnicode_FromId()). |