[issue8237] multiprocessing.Queue() blocks program
Erdem U. Altinyurt
report at bugs.python.org
Fri Mar 26 17:11:05 CET 2010
Erdem U. Altinyurt <spamjunkeater at gmail.com> added the comment:
Firstly I think as you but this is not correct.
Added Q.full() to know if Queue is full or not to the testQ code..
def testQ():
for i in range(10000):
mp.Process( None, QueueWorker, None, (i,Q,lock) ).start()
while len(mp.active_children())>=mp.cpu_count()+4:
time.sleep(0.01)
print Q.full()
output is:
1397 done
1398 done
1399 done
False
False
False
So Queue is not full. And you can also add some things to queue at this state(by adding extra line to while loop) and this will not blocks while loop.
Please test..
----------
status: closed -> open
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8237>
_______________________________________
More information about the Python-bugs-list
mailing list