diff Lib/Queue.py @ 7926:e29d435ab142 legacy-trunk

Clarify that put *blocks* when the queue is full. Add some blank lines to doc strings.
author Guido van Rossum <guido@python.org>
date Thu, 09 Apr 1998 14:25:32 +0000
parents fb4b4d069cc7
children 3a55b4c5e3c7
line wrap: on
line diff
--- a/Lib/Queue.py	Thu Apr 09 14:23:48 1998 +0000
+++ b/Lib/Queue.py	Thu Apr 09 14:25:32 1998 +0000
@@ -44,7 +44,10 @@
         return n
 
     def put(self, item):
-        """Put an item into the queue."""
+        """Put an item into the queue.
+
+	If the queue is full, block until a free slot is avaiable.
+	"""
         self.fsema.acquire_lock()
         self.mutex.acquire_lock()
         was_empty = self._empty()
@@ -57,6 +60,7 @@
 
     def get(self):
         """Gets and returns an item from the queue.
+
         This method blocks if necessary until an item is available.
         """
         self.esema.acquire_lock()
@@ -74,6 +78,7 @@
     # raise Empty if the queue is empty or temporarily unavailable
     def get_nowait(self):
         """Gets and returns an item from the queue.
+
         Only gets an item if one is immediately available, Otherwise
         this raises the Empty exception if the queue is empty or
         temporarily unavailable.