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 eric.snow
Recipients Maxime Belanger, eric.snow, ncoghlan, ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, vstinner, zach.ware
Date 2019-06-14.17:29:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1560533363.46.0.383618111478.issue32280@roundup.psfhosted.org>
In-reply-to
Content
(Sorry for the delay!)

Is the need for a named section due to the fact that _PyRuntime is part of the "internal" C-API (hidden behind the Py_BUILD_CORE macro)?  I.E. would it help to build with Py_BUILD_CORE?


Regarding the GIL:

The plan for 3.9 is to have one GIL per interpreter, so the relevant struct would be PyInterpreterState (a part of the public C-API).  That would be accessible at runtime via the fields of _PyRuntime.interpreters.


Regarding what I said before about multiple runtimes per process:

Honestly, I've yet to see any use case that would justify providing multi-runtime support.  However, there are code-health benefits to keeping *all* runtime state out of static globals.  So eliminating the _PyRuntime static variable is still a realistic possibility (for 3.9 or maybe later).

If that happens then there would have to be a new embedding C-API oriented around (opaque) PyRuntimestate pointers.  See PEP 432 and 587 for ongoing work to improve the embedding experience (for runtime initialization), including what the successors to Py_Initialize() look like.
History
Date User Action Args
2019-06-14 17:29:23eric.snowsetrecipients: + eric.snow, paul.moore, ronaldoussoren, ncoghlan, vstinner, tim.golden, ned.deily, zach.ware, steve.dower, Maxime Belanger
2019-06-14 17:29:23eric.snowsetmessageid: <1560533363.46.0.383618111478.issue32280@roundup.psfhosted.org>
2019-06-14 17:29:23eric.snowlinkissue32280 messages
2019-06-14 17:29:23eric.snowcreate