Antoine Pitrou <pit...@free.fr> added the comment:

Le 25/05/2019 à 23:09, STINNER Victor a écrit :
> 
> I don't see the relationship between the API (signature) and the ability to 
> set a per-thread hook.
> 
> I'm not convinced that a per-thread hook is needed.

Indeed, if you write your own Thread class, you can add a try...except
in the Thread.run() method.  You don't need a dedicated
Thread.excepthook() method.

The only way a per-thread hook could be useful is if you could set it
*outside* of the Thread class (so not as a method), so that one can e.g.
catch / report exceptions raised in threads launches by third-party
libraries.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue1230540>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to