shwouchk added the comment:

The major difference with the issue you referenced is that the behavior in 
#17985 is clearly stated and warned against in the docs (Queue.Empty being 
inconsistent with Queue.size), whereas this is not.

As for the actual behavior problem: Imagine you build an abstraction atop Queue 
(For example and specifically, a queue iterator). This iterator might return 
None or a similar sentinel if there is nothing on the queue.

Since you find the construct useful and would like to keep uniformity in the 
program, there is a place you use this abstraction in a fairly tight loop to 
pass messages from one part of the program to another part, in the same process 
and thread. Now the logic of the program does not work correctly as it was 
based on the assumption that in a single process Queue would work "as expected".

The problem is not the exception but with having an abstraction built atop 
Queue that works right with respect to program logic both when you use it in 
one thread and in multiple ones.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18277>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to