[Zodb-checkins] SVN: ZODB/branches/3.6/src/ZEO/zrpc/connection.py Removed a needless timeout to a condition wait call. Using timeouts

Marius Gedminas marius at pov.lt
Sun Apr 1 15:37:41 EDT 2007


Log message for revision 73966:
  Removed a needless timeout to a condition wait call. Using timeouts
  can cause signidficant delays, especially on systems with very
  course-grained sleeps, like most linux systems.
  
  Extracted from rev 73871 in svn://svn.zope.org/repos/main/ZODB/trunk/src/ZEO
  (Jim Fulton did the extracting and handed me the diff on IRC).
  
  

Changed:
  U   ZODB/branches/3.6/src/ZEO/zrpc/connection.py

-=-
Modified: ZODB/branches/3.6/src/ZEO/zrpc/connection.py
===================================================================
--- ZODB/branches/3.6/src/ZEO/zrpc/connection.py	2007-04-01 19:00:24 UTC (rev 73965)
+++ ZODB/branches/3.6/src/ZEO/zrpc/connection.py	2007-04-01 19:37:41 UTC (rev 73966)
@@ -333,6 +333,9 @@
         self.closed = True
         self.close_trigger()
         self.__super_close()
+        self.replies_cond.acquire()
+        self.replies_cond.notifyAll()
+        self.replies_cond.release()
 
     def close_trigger(self):
         # Overridden by ManagedClientConnection.
@@ -627,7 +630,7 @@
                                  (msgid, short_repr(reply)), level=TRACE)
                     return reply
                 if self.is_async():
-                    self.replies_cond.wait(10.0)
+                    self.replies_cond.wait()
                 else:
                     self.replies_cond.release()
                     try:



More information about the Zodb-checkins mailing list