[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 <http://bugs.python.

[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 usi

[issue11226] subprocesses experience mysterious delay in receiving stdin EOF

2011-02-20 Thread Yang Zhang
Yang Zhang added the comment: After way too much time, I figured it out, after a quote from this post jumped out at me: See the "I/O on Pipes and FIFOs" section of pipe(7) ("man 7 pipe") "If all file descriptors referring to the write end of a pipe have been c

[issue11226] subprocesses experience mysterious delay in receiving stdin EOF

2011-02-16 Thread Yang Zhang
New submission from Yang Zhang : I'm seeing this issue on all the multiple Ubuntu 10.04 boxes I've tried. I reduced a problem I was seeing in my application down into the following test case. In this code, a parent process concurrently spawns 2 (you can spawn more) subprocesses t

[issue7145] UTF-16 BOM is not written by socket.makefile (but is expected by read)

2009-10-15 Thread Yang Zhang
Yang Zhang added the comment: To answer my own question: specify UTF-16BE or UTF-16LE -- ___ Python tracker <http://bugs.python.org/issue7145> ___ ___ Python-bug

[issue7145] UTF-16 BOM is not written by socket.makefile (but is expected by read)

2009-10-15 Thread Yang Zhang
New submission from Yang Zhang : When I call s.makefile('r',encoding='utf-16').read(), this expects a BOM, but s.makefile('w',encoding='utf-16').write('hello') doesn't produce it. This is asymmetric. BTW is there a way to prevent the re

[issue7137] Socket documentation not updated

2009-10-14 Thread Yang Zhang
Changes by Yang Zhang : -- versions: +Python 3.2 -Python 3.1 ___ Python tracker <http://bugs.python.org/issue7137> ___ ___ Python-bugs-list mailing list Unsub

[issue7137] Socket documentation not updated

2009-10-14 Thread Yang Zhang
New submission from Yang Zhang : e.g., the doc still says socket.makefile([mode[, bufsize]]), which aren't the actual python3 params. -- assignee: georg.brandl components: Documentation messages: 94070 nosy: georg.brandl, yang severity: normal status: open title: Socket document