STINNER Victor <vstin...@redhat.com> added the comment:
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 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37076> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com