Skip to content

Conversation

@ericsnowcurrently
Copy link
Member

@ericsnowcurrentlyericsnowcurrently commented Apr 2, 2024

This is similar to the situation with threading._DummyThread. The methods (incl. __del__()) of interpreters.Interpreter objects must be careful with interpreters not created by interpreters.create(). The simplest thing is to disable any method that modifies or runs in the interpreter. As part of this, the runtime keeps track of where an interpreter was created. We also handle interpreter "refcounts" properly.

@ericsnowcurrentlyericsnowcurrentlyforce-pushed the hide-legacy-subinterpreters branch from 7de833a to e38f141CompareApril 11, 2024 00:40
@ericsnowcurrentlyericsnowcurrently marked this pull request as ready for review April 11, 2024 20:40
@ericsnowcurrentlyericsnowcurrently enabled auto-merge (squash) April 11, 2024 22:59
@ericsnowcurrentlyericsnowcurrently merged commit fd259fd into python:mainApr 11, 2024
@ericsnowcurrentlyericsnowcurrently deleted the hide-legacy-subinterpreters branch April 11, 2024 23:26
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
This is similar to the situation with threading._DummyThread. The methods (incl. __del__()) of interpreters.Interpreter objects must be careful with interpreters not created by interpreters.create(). The simplest thing to start with is to disable any method that modifies or runs in the interpreter. As part of this, the runtime keeps track of where an interpreter was created. We also handle interpreter "refcounts" properly.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@ericsnowcurrently