[tor-commits] [arm/release] fix: Log panel busy wait during curses lock
atagar at torproject.org
atagar at torproject.org
Sun Jul 17 06:08:20 UTC 2011
commit 6f46b55a97e67922d5d6aa1b1ec8340e5085a406
Author: Damian Johnson <atagar at torproject.org>
Date: Fri May 13 08:17:13 2011 -0700
fix: Log panel busy wait during curses lock
If we registered events while the curses lock was held (for instance with a
popup or prompt for user input) then arm would peg the cpu. The reason for
this was that the log panel was attempting to redraw itself, but not
registering any of the attempts since they all failed so it became a busy
wait.
---
src/cli/logPanel.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/cli/logPanel.py b/src/cli/logPanel.py
index 34bf759..6d54ab4 100644
--- a/src/cli/logPanel.py
+++ b/src/cli/logPanel.py
@@ -1079,6 +1079,10 @@ class LogPanel(panel.Panel, threading.Thread):
else:
lastDay = currentDay
self.redraw(True)
+
+ # makes sure that we register this as an update, otherwise lacking the
+ # curses lock can cause a busy wait here
+ self._lastUpdate = time.time()
def stop(self):
"""
More information about the tor-commits
mailing list