]> granicus.if.org Git - python/commitdiff
Redocument the empty() and full() methods.
authorRaymond Hettinger <python@rcn.com>
Sat, 7 Mar 2009 14:07:37 +0000 (14:07 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 7 Mar 2009 14:07:37 +0000 (14:07 +0000)
Doc/library/queue.rst

index 4ed3dcc6321e5d02641156e62f1d8aa4cab3ff90..acd953d3fd672723f68528a8d389fabe08966e53 100644 (file)
@@ -78,6 +78,22 @@ provide the public methods described below.
    guarantee that put() will not block.
 
 
+.. method:: Queue.empty()
+
+   Return ``True`` if the queue is empty, ``False`` otherwise.  If empty()
+   returns ``True`` it doesn't guarantee that a subsequent call to put()
+   will not block.  Similarly, if empty() returns ``False`` it doesn't
+   guarantee that a subsequent call to get() will not block.
+
+
+.. method:: Queue.full()
+
+   Return ``True`` if the queue is full, ``False`` otherwise.  If full()
+   returns ``True`` it doesn't guarantee that a subsequent call to get()
+   will not block.  Similarly, if full() returns ``False`` it doesn't
+   guarantee that a subsequent call to put() will not block.
+
+
 .. method:: Queue.put(item[, block[, timeout]])
 
    Put *item* into the queue. If optional args *block* is true and *timeout* is