This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients eric.snow, vstinner
Date 2019-06-04.01:21:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1559611292.93.0.330736115799.issue36818@roundup.psfhosted.org>
In-reply-to
Content
By the way, I have questions about the rationale of this change.

> Currently we use the _PyRuntime static global to access the runtime state in various places.  At the same time, in thread contexts we get access to the thread state from Thread-Local Storage and the interpreter state by indirection from there.  We should do the same for the runtime state instead of using the global directly.

Right now I'm confused. _PyRuntimeState contains scatted states: things which should be moved to PyInterpreterState or even PyThreadState, and things which should remain in _PyRuntimeState. My notes on this topic:
https://pythoncapi.readthedocs.io/runtime.html

Is PyInterpreterState.runtime a temporary fix until things are moved?

Or do you plan to never access _PyRuntime directly, and always through interp->runtime?

It seems like in the short term, we must continue to access "_PyRuntime" through a separated "runtime" pointer passed to functions, to handle daemon threads during Python shutdown.
History
Date User Action Args
2019-06-04 01:21:32vstinnersetrecipients: + vstinner, eric.snow
2019-06-04 01:21:32vstinnersetmessageid: <1559611292.93.0.330736115799.issue36818@roundup.psfhosted.org>
2019-06-04 01:21:32vstinnerlinkissue36818 messages
2019-06-04 01:21:32vstinnercreate