This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kristjan.jonsson
Recipients BreamoreBoy, ajaksu2, benjamin.peterson, dcjim, elachuni, gvanrossum, jon, kristjan.jonsson, mark.dickinson, pitrou, qelan, tseaver, vdupras, vstinner
Date 2013-11-19.10:34:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384857299.95.0.555113972838.issue7105@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, the "long iterator" scenario is the reason it is not ideal for this scenario.
The other one (gc.collect()) is easily solved by implementing this construct natively.  It can be done rather simply by adding an overriding "pause" property to gc, with the following api:

def pause(increment):
  """
  pause or unpause garbage collection.  A positive value
  increases the pause level, while a negative one reduces it.
  when paused, gc won't happen even when explicitly requested with
  gc.collect(), until the pause level drops to 0.
  """

I'm sure there are other places in the code with local execution that would benefit from not having an accidental GC run happen.  I'm sure I've seen such places, with elaborate scaffolding to safeguard itself from such cases.

Anyway, my 2 aurar worth of lateral thinking applied to the problem at hand :)

What about the patch itself?
History
Date User Action Args
2013-11-19 10:35:00kristjan.jonssonsetrecipients: + kristjan.jonsson, gvanrossum, dcjim, tseaver, mark.dickinson, pitrou, vstinner, ajaksu2, jon, benjamin.peterson, vdupras, elachuni, BreamoreBoy, qelan
2013-11-19 10:34:59kristjan.jonssonsetmessageid: <1384857299.95.0.555113972838.issue7105@psf.upfronthosting.co.za>
2013-11-19 10:34:59kristjan.jonssonlinkissue7105 messages
2013-11-19 10:34:59kristjan.jonssoncreate