[issue13542] Memory leak in multiprocessing.pool

2011-12-07 Thread Charles-François Natali
Charles-François Natali added the comment: It's a duplicate of #12157. -- nosy: +neologix resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

[issue13542] Memory leak in multiprocessing.pool

2011-12-07 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +jnoller stage: -> needs patch versions: -Python 2.6, Python 3.1, Python 3.4 ___ Python tracker ___ _

[issue13542] Memory leak in multiprocessing.pool

2011-12-06 Thread Yang Zhang
Yang Zhang added the comment: Oops, sorry - pasted a wrong example. In [38]: tp = ThreadPool(5) In [39]: xs = tp.map(lambda x: x, []) In [40]: xs Out[40]: [] In [41]: tp._cache Out[41]: {3: } -- ___ Python tracker

[issue13542] Memory leak in multiprocessing.pool

2011-12-06 Thread Yang Zhang
New submission from Yang Zhang : Calling Pool.map (and friends) on empty lists [] causes Pool._cache to hang on to the MapResults forever: tp = ThreadPool(5) xs = tp.map(lambda x: 'a' * int(10e6), range(100)) # now using 1GB mem = 100 * 10MB strs del xs gc.collect() # still using 1GB mem tp.clo