[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

Mark Shannon report at bugs.python.org
Fri Mar 27 12:10:06 EDT 2020


Mark Shannon <mark at hotpy.org> added the comment:

Just to add my 2 cents.

I think this a bad idea and is likely to be unsafe.
Having interpreters interfering with each other's objects is almost certain to lead to race conditions.

IMO, objects should *never* be shared across interpreters (once interpreters are expected to be able to run in parallel).

Any channel between two interpreters should consist of two objects, one per interpreter. The shared memory they use to communicated can be managed by the runtime. Likewise for inter-interpreter locks. The lock itself should be managed by the runtime, with each interpreter having its own lock object with a handle on the shared lock.

----------
nosy: +Mark.Shannon

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


More information about the Python-bugs-list mailing list