Queue qsize = unreliable?

James R. Saker Jr. jsaker at americanrelay.com
Fri Aug 6 11:24:10 EDT 2004


I see per pydoc that Queue.Queue()'s .qsize is allegedly unreliable:

     |  qsize(self)
     |      Return the approximate size of the queue (not reliable!).

Any thoughts on why this is unreliable (and more curiously, why it would
be put in there as an unreliable function?) Rather than roll my own
threaded fifo class, it would seem prudent to use Python's built-in
Queue but the warning signs on a rather necessary function seem curious.

Jamie





More information about the Python-list mailing list