STINNER Victor <vstin...@redhat.com> added the comment:

Jeroen Demeyer:
> Sorry, but I don't see the relation between this issue and PEP 554.

The long term plan for PEP 554 is to support having one GIL per interpreter for 
best performances. The GIL lives in _PyRuntime.

It's not just about the GIL. Currently, the gc module stores its state into 
_PyRuntime. It's wrong to share a single gc state between two interpreters: 
each interpreter should have its own "namespace" completely isolated from the 
other namespaces. For example, _PyRuntime.gc.garbage is a Python list: each 
interpreter should have its own list.

My PR 12934 is only a first step to prepare ceval.c for that.

Said differently, if I understood correctly, each interpreter must have its own 
_PyRuntime instance.

Maybe tomorrow, we will keep a single _PyRuntime instance, *but* my work is 
needed to identify the relationship between the current implementation of 
Python and _PyRuntime.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36710>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to