On Sun, Nov 17, 2019 at 1:58 PM Nick Coghlan <ncogh...@gmail.com> wrote: > On Sat., 16 Nov. 2019, 8:26 am Nathaniel Smith, <n...@pobox.com> wrote: >> >> As you know, I'm skeptical that PEP 554 will produce benefits that are >> worth the effort, but let's assume for the moment that it is, and >> we're all 100% committed to moving all globals into the threadstate. >> Even given that, the motivation for this change seems a bit unclear to >> me. >> >> I guess the possible goals are: >> >> - Get rid of the "ambient" threadstate entirely >> - Make accessing the threadstate faster > > - Eventually make it easier for CPython maintainers to know which functions > require access to a live thread state, and which are stateless helper > functions
So the idea would be that eventually we'd remove all uses of implicit state lookup inside CPython, and add some kind of CI check to make sure that they're never used? > - Eventually make it easier for embedding applications to control which > Python code runs in which thread state by moving the thread state activation > dance out of the application and into the CPython shared library That seems like a good goal, but I don't understand how it's related to passing threadstate explicitly as a function argument. If the plan is to move towards passing threadstates both implicitly AND explicitly everywhere, that seems like it would make things more error-prone, not less, because the two states could get out of sync. Could you elaborate? -n -- Nathaniel J. Smith -- https://vorpus.org _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/5JKNEYXI6ZILC3P6JBXW7NKAUVMXBRQN/ Code of Conduct: http://python.org/psf/codeofconduct/