➜

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.

作者 eric.snow
收信人 Johan Dahlin, db3l, emilyemorehouse, eric.snow, koobs, nascheme, ncoghlan, pconnell, pmpp, serhiy.storchaka, shprotx, steve.dower, vstinner, yselivanov
日期 2019-12-20.23:46:04
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1576885565.18.0.0983762055017.issue33608@roundup.psfhosted.org>
In-reply-to
内容
Thanks for the detailed analysis, Phil.  I think the results are pretty conclusive: daemon threads are the worst. :)  But seriously, thanks.

As you demonstrated, it isn't just Python "daemon" threads that cause the problem.  It is essentially any external access of the C-API once runtime finalization has started.  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?

Given that this is essentially a separate problem, let's move further discussion and effort over related to sorting out problematic threads to #36476, "Runtime finalization assumes all other threads have exited."  @Phil, would you mind attaching those same two files to that issue?


[1] https://docs.python.org/3/c-api/init.html#c.Py_FinalizeEx
历史
日期 用户 动作 参数
2019-12-20 23:46:05eric.snow修改recipients: + eric.snow, nascheme, db3l, ncoghlan, vstinner, pmpp, serhiy.storchaka, yselivanov, koobs, steve.dower, pconnell, emilyemorehouse, Johan Dahlin, shprotx
2019-12-20 23:46:05eric.snow修改messageid: <1576885565.18.0.0983762055017.issue33608@roundup.psfhosted.org>
2019-12-20 23:46:05eric.snow链接issue33608 messages
2019-12-20 23:46:04eric.snow创建