Message187482
This experimental patch proposes to defer generator cleanup to the frame itself. In this scheme, the generator frame's tp_clear throws the GeneratorExit if necessary, so as to call cleanup code. The generator doesn't have any tp_del anymore, as it is now impossible to resurrect a generator (the frame, though, can be resurrected; I have to add a test for that).
The net effect is that generators caught in a reference cycle can always be reclaimed, and their cleanup code is run in a valid frame. |
|
Date |
User |
Action |
Args |
2013-04-21 01:37:32 | pitrou | set | recipients:
+ pitrou, ncoghlan, benjamin.peterson |
2013-04-21 01:37:31 | pitrou | set | messageid: <1366508251.45.0.78173664702.issue17807@psf.upfronthosting.co.za> |
2013-04-21 01:37:31 | pitrou | link | issue17807 messages |
2013-04-21 01:37:31 | pitrou | create | |
|