[issue18277] Queue is empty right after put from the same process/thread

2013-06-24 Thread shwouchk
shwouchk added the comment: I agree it might be less efficient, but sometimes it is the price to pay for greater generality/simplicity. After all, If I *really* wanted efficiency perhaps I would have written everything in C++. Anyway, thanks! n.p. 1. "but should not cause any pra

[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread shwouchk
shwouchk added the comment: Also, of course I did this or I would not have stumbled into this issue... -- ___ Python tracker <http://bugs.python.org/issue18

[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread shwouchk
shwouchk added the comment: Richard, I think you missed my point. First, yes I did do that. Second ("the point"): I did this to use the same abstraction that was used extensively for other purposes, instead of recreating the same abstraction with a deque as its basis. Component r

[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread shwouchk
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

[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread shwouchk
New submission from shwouchk: Consider this: $ python Python 2.7.4 (default, Apr 19 2013, 18:28:01) [GCC 4.7.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing as mp