Message340556
I agree that we should not change the default behavior of Thread.join(), as that would break existing code, but there are plenty of other ways to do this. I see a couple of possibilities:
1. Add an option to the Thread constructor, something like raise_exc, that defaults to False, but when set to True, causes join() to raise any exceptions.
2. (Better, IMO) Add this option to the join() method instead.
3. Create a new method, join_with_exc(), that acts like join() but raises exceptions from the target.
4. (Should probably do this anyway, regardless of what else we do) Add a new method, check_exc(), that checks if any unhandled exceptions have occurred in the thread and returns and/or raises any that have. |
|
Date |
User |
Action |
Args |
2019-04-19 20:41:38 | Joel Croteau | set | recipients:
+ Joel Croteau, tim.peters, pitrou, giampaolo.rodola, pablogsal |
2019-04-19 20:41:38 | Joel Croteau | set | messageid: <1555706498.54.0.341854467544.issue36666@roundup.psfhosted.org> |
2019-04-19 20:41:38 | Joel Croteau | link | issue36666 messages |
2019-04-19 20:41:38 | Joel Croteau | create | |
|