[issue17985] multiprocessing Queue.qsize() and Queue.empty() with different results

Richard Oudkerk report at bugs.python.org
Thu May 16 00:24:06 CEST 2013


Richard Oudkerk added the comment:

On 15/05/2013 10:25pm, Andre Dias wrote:
> But qsize() is working. what is not working is empty()

empty() returns False when there is data in the underlying pipe.  But 
the data does not enter the pipe until a background thread has written 
it to the pipe.  This should not cause any problems.

Using Queue.empty() is always subject to races.  It is just that the 
multiprocessing version has an additional type of race compared to the 
normal one.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17985>
_______________________________________


More information about the Python-bugs-list mailing list