New submission from Andre Dias:
The problem is that Queue.empty() is True even if Queue.qsize()>0!
#!/usr/bin/python
from multiprocessing import Queue
numbers=Queue()
for i in range (0,10):
numbers.put(i)
if numbers.qsize()>0 and numbers.empty():
print "BUG?!"
-
Andre Dias added the comment:
But qsize() is working. what is not working is empty()
2013/5/15 Richard Oudkerk
>
> Richard Oudkerk added the comment:
>
> >From the docs:
>
> qsize()
> Return the approximate size of the queue. Because of
> multithreadin
Andre Dias added the comment:
RIchard,
But the example program has no races, no threads, nothing.
empty() is returning TRUE even though qsize() is >0 (which actually is)
And it happens almost every time I run that small example.
I had read the module doc, and I know its an unreliable met