[Zodb-checkins] CVS: StandaloneZODB/ZEO - zrpc.py:1.19

Jeremy Hylton jeremy@zope.com
Fri, 7 Sep 2001 15:41:23 -0400


Update of /cvs-repository/StandaloneZODB/ZEO
In directory cvs.zope.org:/tmp/cvs-serv16366

Modified Files:
	zrpc.py 
Log Message:
Merge in zeo-1_0-branch

Use asyncwrap to call asyncore.loop() and asyncore.poll().
Add definition for EINTR.



=== StandaloneZODB/ZEO/zrpc.py 1.18 => 1.19 ===
 from smac import SizedMessageAsyncConnection
 import socket, string, struct, asyncore, sys, time, select
-TupleType=type(())
 from zLOG import LOG, TRACE, DEBUG, INFO
+from ZEO import asyncwrap
+
+from errno import EINTR
+TupleType=type(())
 
 # We create a special fast pickler! This allows us
 # to create slightly more efficient pickles and
@@ -184,13 +187,13 @@
             try: r, w, e = select.select([self._fileno],[],[],0.0)
             except select.error, v:
                 if v[0] != EINTR: raise
-            if r: asyncore.poll(0.0, self)
+            if r: asyncwrap.poll(0.0, self)
             else: break
 
     def readLoop(self):
         la=self.__la
         while not la(0):
-            asyncore.poll(60.0, self)
+            asyncwrap.poll(60.0, self)
         self.__lr()
 
     def setLoop(self, map=None, Wakeup=lambda : None):
@@ -240,7 +243,7 @@
         self.message_output(dump(args,1))
         if self.__haveMainLoop:
             self.__Wakeup() # Wake up the main loop
-        else: asyncore.poll(0.0, self)
+        else: asyncwrap.poll(0.0, self)
 
     def setOutOfBand(self, f):
         """Define a call-back function for handling out-of-band communication