[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - Iterators.py:1.3

Paul Winkler pw_lists at slinkp.com
Thu Apr 8 11:55:51 EDT 2004


Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv24073

Modified Files:
	Iterators.py 
Log Message:

Added Shane's warning re. not using the ZODB to docstring.


=== Zope/lib/python/ZPublisher/Iterators.py 1.2 => 1.3 ===
--- Zope/lib/python/ZPublisher/Iterators.py:1.2	Sun Mar 28 06:12:55 2004
+++ Zope/lib/python/ZPublisher/Iterators.py	Thu Apr  8 11:55:50 2004
@@ -1,11 +1,25 @@
 from Interface import Interface
 
 class IStreamIterator(Interface):
+    """
+    An iterator that can be published.
+
+    IStreamIterators must not read from the object database.
+    After the application finishes interpreting a request and 
+    returns an iterator to be processed asynchronously, it closes 
+    the ZODB connection. If the iterator then tries to load some 
+    ZODB object, ZODB would do one of two things.  If the connection 
+    is still closed, ZODB would raise an error. If the connection 
+    happens to be re-opened by another thread, ZODB might allow it, 
+    but it has a chance of going insane if it happens to be loading 
+    or storing something in the other thread at the same time.                      """
+
     def next(self):
         """
         Return a sequence of bytes out of the bytestream, or raise
         StopIeration if we've reached the end of the bytestream.
         """
+
 class filestream_iterator(file):
     """
     a file subclass which implements an iterator that returns a




More information about the Zope-Checkins mailing list