Eric Snow <ericsnowcurren...@gmail.com> added the comment:

@Neil, we're definitely on the same page.  In fact, in a world where 
subinterpreters do not share a GIL, we can't ever use an object in one 
interpreter that was created in another (due to thread safety on refcounts).  
The role of "tightly controlling" passing/sharing objects (for a very loose 
definition of "sharing") falls to the channels described in PEP 554. [1]

However, there are several circumstances where interpreters may collaborate 
that involves one holding a reference (but not using it) to an object owned by 
the other.  For instance, see PyBuffer_Release(). [2]  This issue is about 
addressing that situation safely.  It is definitely not about safely using 
objects from other interpreters.

[1] The low-level implementation, including channels, already exists in 
Modules/_xxsubinterpretersmodule.c.
[2] https://docs.python.org/3/c-api/buffer.html#c.PyBuffer_Release

----------
assignee:  -> eric.snow

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

Reply via email to