-1 if I may.
I use qsize() to sustain an average queue size (unreliably) but not
allowing the queue to be full. Certainly, this could be done in some
other way, but the existence of the method remains very useful.
cheers
On Jan 11, 2008, at 8:13 PM, Raymond Hettinger wrote:
I proposed to remove three methods from the queue module, qsize(),
empty(), and full(). These are not reliable. The RightWay (tm) is
to trap the Empty and Full exceptions or use the .join() approach.
Raymond
--- From the docs ---
Queue.qsize()¶
Return the approximate size of the queue. Because of
multithreading semantics, this number is not reliable.
Queue.empty()¶
Return True if the queue is empty, False otherwise. Because of
multithreading semantics, this is not reliable.
Queue.full()¶
Return True if the queue is full, False otherwise. Because of
multithreading semantics, this is not reliable.
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/miguel.branco%40cern.ch
--
Miguel Branco, CERN - ATLAS Computing Group
MSN: [EMAIL PROTECTED]
+41 22 76 71268 - http://cern.ch/mbranco/
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com