[issue36476] Runtime finalization assumes all other threads have exited.

Eric Snow report at bugs.python.org
Fri Dec 20 18:54:01 EST 2019


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

To put it another way:

(from issue33608#msg358748)

> The docs [1] aren't super clear about it, but there are some fundamental
> assumptions we make about runtime finalization:
>
> * no use of the C-API while Py_FinalizeEx() is executing (except for a
> few helpers like Py_Initialized)
> * only a small portion of the C-API is available afterward (at least
> until Py_Initialize() is run)
>
> I guess the real question is what to do about this?
> 
>[1] https://docs.python.org/3/c-api/init.html#c.Py_FinalizeEx

Adding to that list:

* no other Python threads are running once we start finalizing the runtime (not far into Py_FinalizeEx())

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36476>
_______________________________________


More information about the Python-bugs-list mailing list