Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Marius Gedminas <marius <at> pov.lt>
Subject: SVN: ZODB/branches/3.6/src/ZEO/zrpc/connection.py Removed a needless timeout to a condition wait call. Using timeouts
Newsgroups: gmane.comp.python.zope.zodb.cvs
Date: Sunday 1st April 2007 19:37:41 UTC (over 10 years ago)
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:
 
CD: 3ms