[ python-Bugs-1213475 ] Queue.qsize() better info about unreliability

SourceForge.net noreply at sourceforge.net
Tue Jun 14 10:52:30 CEST 2005


Bugs item #1213475, was opened at 2005-06-02 07:56
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1213475&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
>Status: Closed
>Resolution: Out of Date
Priority: 5
Submitted By: Nikos Kouremenos (nkour)
Assigned to: Nobody/Anonymous (nobody)
Summary: Queue.qsize() better info about unreliability

Initial Comment:
I know Queues are supposed to be used mostly in threads
apps.
since they are not banned to apps without threads, I
think that

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

can be better.
You mean not reliable (or unreliable :D) because of
threads right?

if you mean *GENERALLY* because of when ti goes to next
instruction it might have change, then put this not
reliable thing in len() too ;)

I propose:
(urreliable if using threads)

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2005-06-14 03:52

Message:
Logged In: YES 
user_id=80475

In Py2.4.1, the wording is already:
   Because of multithreading semantics, this number is not
reliable.

----------------------------------------------------------------------

Comment By: Nikos Kouremenos (nkour)
Date: 2005-06-02 08:02

Message:
Logged In: YES 
user_id=865368

or better:

qsize() :: "Return the approximate size of the queue.
Because of multithreading semantics, this number is not
reliable." (RexxFi)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1213475&group_id=5470


More information about the Python-bugs-list mailing list