Message344515
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. |
|
Date |
User |
Action |
Args |
2019-06-04 01:21:32 | vstinner | set | recipients:
+ vstinner, eric.snow |
2019-06-04 01:21:32 | vstinner | set | messageid: <1559611292.93.0.330736115799.issue36818@roundup.psfhosted.org> |
2019-06-04 01:21:32 | vstinner | link | issue36818 messages |
2019-06-04 01:21:32 | vstinner | create | |
|