Queue cleanup
MRAB
python at mrabarnett.plus.com
Wed Aug 11 15:33:17 EDT 2010
Paul Rubin wrote:
> EW <ericwoodworth at gmail.com> writes:
>> Well I cared because I thought garbage collection would only happen
>> when the script ended - the entire script. Since I plan on running
>> this as a service it'll run for months at a time without ending. So I
>> thought I was going to have heaps of Queues hanging out in memory,
>> unreferenced and unloved. It seemed like bad practice so I wanted to
>> get out ahead of it.
>
> Even if GC worked that way it wouldn't matter, if you use just one queue
> per type of task. That number should be a small constant so the memory
> consumption is small.
That's basically how _non_-garbage-collected languages work! :-)
More information about the Python-list
mailing list