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 jbms
Recipients gregory.p.smith, izbyshev, jbms, vstinner
Date 2021-09-24.15:24:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632497067.59.0.160724376888.issue42969@roundup.psfhosted.org>
In-reply-to
Content
To be clear, the problem I'm trying to address here is not specific to embedding Python in a C++ application.  In fact the issue came to my attention while using Python directly, but loading an extension module that was written in C++ using the popular pybind11 library.

If we continue having Python call `pthread_exit` and `_endthreadex`, we are imposing strong constraints on call stacks that call the Python API.  Granted, hanging a thread is also not something a well-behaved library should do, but it is at least slightly better than killing the thread.  In a sense hanging is also logical, since the thread has requested to block until the GIL can be acquired, and the GIL cannot be acquired.

I have described a number of problems caused by `pthread_exit`/`_endthreadex` that are fixed by hanging.  Can you help me understand what problems caused by hanging are fixed by `pthread_exit`/`_endthreadex`, that leads you to think it is a better default?
History
Date User Action Args
2021-09-24 15:24:27jbmssetrecipients: + jbms, gregory.p.smith, vstinner, izbyshev
2021-09-24 15:24:27jbmssetmessageid: <1632497067.59.0.160724376888.issue42969@roundup.psfhosted.org>
2021-09-24 15:24:27jbmslinkissue42969 messages
2021-09-24 15:24:27jbmscreate