Message410866
> If we have static types, that means there is a mechanism to share some objects across interpreters.
Sharing objects between interpreters is bad and is causing complex bugs. See a recent example of an object traveling from one interpreter to another and then causing a random crash on Windows related to the garbage collector:
* https://bugs.python.org/issue46070
* https://github.com/python/cpython/pull/30577#pullrequestreview-852106207
> And if that's the case, why can't small ints (like sys.float_info.n_unnamed_fields) be static & shared as well?
I would prefer to discuss that in other issues like bpo-40255 or bpo-39511, and focus this issue on fixing the static types implementation when Python is embedded in an application.
--
Hum, this issue is not really related to sub-interpreters. My proposed PR only changes Py_Finalize(): the main interpreter. |
|
Date |
User |
Action |
Args |
2022-01-18 13:58:57 | vstinner | set | recipients:
+ vstinner, petr.viktorin, shihai1991, erlendaasland |
2022-01-18 13:58:57 | vstinner | set | messageid: <1642514337.76.0.937963974418.issue46417@roundup.psfhosted.org> |
2022-01-18 13:58:57 | vstinner | link | issue46417 messages |
2022-01-18 13:58:57 | vstinner | create | |
|