Message343512
Serhiy Storchaka:
> I propose to add the Thead.excepthook() method with the signature compatible with sys.excepthook(). This will allow to set easily per-thread hooks and a global hook.
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. My proposed global threading.excepthook gets a thread parameter which allows a custom hook to implement a different behavior depending on the thread. You can use a different behavior depending on the thread name, depending on a custom Thread attribute, etc.
Would it be acceptable for first add a global hook and see later if a per-thread hook is needed? |
|
Date |
User |
Action |
Args |
2019-05-25 21:09:43 | vstinner | set | recipients:
+ vstinner, mwh, tim.peters, ncoghlan, ellisj, pitrou, tiagoaoa, eric.araujo, undercoveridiot, vlasovskikh, serhiy.storchaka, lazka, Decorater, CyberJacob, Matt Groth |
2019-05-25 21:09:43 | vstinner | set | messageid: <1558818583.51.0.823618242649.issue1230540@roundup.psfhosted.org> |
2019-05-25 21:09:43 | vstinner | link | issue1230540 messages |
2019-05-25 21:09:43 | vstinner | create | |
|