Author vstinner
Recipients vstinner
Date 2019-05-28.10:23:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1559038995.49.0.868306719569.issue37076@roundup.psfhosted.org>
In-reply-to
Content
This issue is a follow-up of:

* bpo-36829: Add sys.unraisablehook() to custom how "unraisable exceptions" are logged
* bpo-1230540: Add threading.excepthook() to handle uncaught exceptions raised by Thread.run()


Discussions around _thread.start_new_thead() exception:

Antoine Pitrou:
"""
From the doc: Handle uncaught :func:``Thread.run`` exception.

What if some C extension wants to report uncaught exceptions in C-created threads? Does it have to create a dummy Thread object?

For example, how about threads created by _thread.start_new_thread?
"""

https://github.com/python/cpython/pull/13515#issuecomment-495935350


Serhiy Storchaka:
"If we want to support low-level threads created by start_new_thread() we should call [threading.]excepthook() from t_bootstrap instead of Thread._bootstrap_inner. Otherwise implementing excepthook() as a Thread method would be more convenient."

https://bugs.python.org/issue1230540#msg343748
History
Date User Action Args
2019-05-28 10:23:15vstinnersetrecipients: + vstinner
2019-05-28 10:23:15vstinnersetmessageid: <1559038995.49.0.868306719569.issue37076@roundup.psfhosted.org>
2019-05-28 10:23:15vstinnerlinkissue37076 messages
2019-05-28 10:23:15vstinnercreate