Message277396
In the first case, once the loop has run the task it no longer has a reference to it, and it gets GCed. The __del__ method of the task calls your exception handler. In the second case, you have a reference to it, so __del__ does not get called.
If you want the exception to be realized in the second case, you have to yield from it somewhere in your program. |
|
Date |
User |
Action |
Args |
2016-09-25 19:21:46 | r.david.murray | set | recipients:
+ r.david.murray, gvanrossum, yselivanov, billyfoster |
2016-09-25 19:21:46 | r.david.murray | set | messageid: <1474831306.77.0.95452237023.issue28274@psf.upfronthosting.co.za> |
2016-09-25 19:21:46 | r.david.murray | link | issue28274 messages |
2016-09-25 19:21:46 | r.david.murray | create | |
|