Author vstinner
Recipients CyberJacob, Decorater, Matt Groth, ellisj, eric.araujo, lazka, mwh, ncoghlan, pitrou, serhiy.storchaka, tiagoaoa, tim.peters, undercoveridiot, vlasovskikh, vstinner
Date 2019-05-25.21:09:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1558818583.51.0.823618242649.issue1230540@roundup.psfhosted.org>
In-reply-to
Content
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?
History
Date User Action Args
2019-05-25 21:09:43vstinnersetrecipients: + vstinner, mwh, tim.peters, ncoghlan, ellisj, pitrou, tiagoaoa, eric.araujo, undercoveridiot, vlasovskikh, serhiy.storchaka, lazka, Decorater, CyberJacob, Matt Groth
2019-05-25 21:09:43vstinnersetmessageid: <1558818583.51.0.823618242649.issue1230540@roundup.psfhosted.org>
2019-05-25 21:09:43vstinnerlinkissue1230540 messages
2019-05-25 21:09:43vstinnercreate