[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

Raymond Hettinger report at bugs.python.org
Sun Feb 2 17:32:13 EST 2020


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Random idea (not carefully thought-out):  Would it be simpler to have these objects just ignore their refcount by having dealloc() be a null operation or having it set the refcount back to a positive number).  That would let sub-interpreters share the objects without worrying about race-conditions on incref/decref operations.  To make this work, the objects can register themselves as permanent, shared, objects; then, during shutdown, we could explicitly call a hard dealloc on those objects.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39511>
_______________________________________


More information about the Python-bugs-list mailing list