[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r18184: {weather} Change the locking semantics around the ping_all calls and a (weather/trunk)
Author: ioerror
Date: 2009-01-19 19:10:59 -0500 (Mon, 19 Jan 2009)
New Revision: 18184
Modified:
weather/trunk/poll.py
Log:
Change the locking semantics around the ping_all calls and add some more timing information.
Modified: weather/trunk/poll.py
===================================================================
--- weather/trunk/poll.py 2009-01-19 23:02:44 UTC (rev 18183)
+++ weather/trunk/poll.py 2009-01-20 00:10:59 UTC (rev 18184)
@@ -174,11 +174,11 @@
# nodes stay in the subscription db even if nobody is subscribed to them
# anymore
if self.subscriptions[node] != "":
- self.gdbm_lock.release()
+ #self.gdbm_lock.release()
try:
self.ping(node) # this is time consuming ; don't hold the lock
- finally:
- self.gdbm_lock.acquire()
+ #finally:
+ # self.gdbm_lock.acquire()
node = self.subscriptions.nextkey(node)
finally:
@@ -189,8 +189,11 @@
#del self.tp # this minimises the chance of confusion a local tor control
# port crash with a remote node being down
- if debug: print "Ping_all finished"
-
+ if debug:
+ print "Ping_all finished"
+ print "Ending the last round of polls"
+ print 'Timestamp', datetime.now().isoformat('-')
+
def ping(self, node):
if debug: print "pinging", node
try: