[Zodb-checkins] CVS: ZODB3/ZEO/zrpc - connection.py:1.38.2.5

Jeremy Hylton jeremy at zope.com
Thu Jun 5 19:42:37 EDT 2003


Update of /cvs-repository/ZODB3/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv14016/ZEO/zrpc

Modified Files:
      Tag: ZODB3-3_1-branch
	connection.py 
Log Message:
Make sure invalidations are sent atomically by the ZEO server.

Extend zrpc with a way to call a method without also calling poll() to
do I/O.  The I/O is undesirable because it could allow a load from a
client to sneak in before the invalidation is sent.  The I/O is
unnecessary because the caller will return to the mainloop and do the
I/O when all the invalidations are sent.

Patch from Guido.


=== ZODB3/ZEO/zrpc/connection.py 1.38.2.4 => 1.38.2.5 ===
--- ZODB3/ZEO/zrpc/connection.py:1.38.2.4	Tue Apr 29 16:36:41 2003
+++ ZODB3/ZEO/zrpc/connection.py	Thu Jun  5 18:42:36 2003
@@ -359,6 +359,14 @@
             raise DisconnectedError()
         self.send_call(method, args, ASYNC)
         self.poll()
+        
+    def callAsyncNoPoll(self, method, *args):
+        # Like CallAsync but doesn't poll.  This exists so that we can
+        # send invalidations atomically to all clients without
+        # allowing any client to sneak in a load request.
+        if self.closed:
+            raise DisconnectedError()
+        self.send_call(method, args, ASYNC)
 
     # handle IO, possibly in async mode
 




More information about the Zodb-checkins mailing list