Message258116
| Author |
gvanrossum |
| Recipients |
benhoyt, gvanrossum, larry, serhiy.storchaka, vstinner |
| Date |
2016年01月12日.18:36:17 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1452623777.81.0.642442440041.issue25995@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I like them both, if I had to choose I'd pick patch 2.
But yes, we need to add a close() method to the scandir iterator object.
In the meantime, I am still worried about what would happen if somehow the loop got interrupted and the frame got kept alive and the iterator wasn't closed by its dealloc until much later. This kind of thing was common in asyncio and we had to resort to similar tricks to break some cycles. Maybe you can add a try/finally that *deletes* scandir_it to force it to close itself (at least in CPython)? That can go into 3.5. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年01月12日 18:36:17 | gvanrossum | set | recipients:
+ gvanrossum, vstinner, larry, benhoyt, serhiy.storchaka |
| 2016年01月12日 18:36:17 | gvanrossum | set | messageid: <1452623777.81.0.642442440041.issue25995@psf.upfronthosting.co.za> |
| 2016年01月12日 18:36:17 | gvanrossum | link | issue25995 messages |
| 2016年01月12日 18:36:17 | gvanrossum | create |
|