[pyatspi2] Fix 100% CPU usage. The event dispatcher funtion was running
- From: Mark Doffman <markdoffman src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pyatspi2] Fix 100% CPU usage. The event dispatcher funtion was running
- Date: Mon, 7 Dec 2009 12:21:52 +0000 (UTC)
commit 30280d2d27b62c33ff71bbedd75c0e0d33de2238
Author: Mark Doffman <mark doffman codethink co uk>
Date: Sat Dec 5 23:13:07 2009 -0800
Fix 100% CPU usage. The event dispatcher funtion was running
continuously.
pyatspi/busutils/bus.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pyatspi/busutils/bus.py b/pyatspi/busutils/bus.py
index d152ec1..07c7658 100644
--- a/pyatspi/busutils/bus.py
+++ b/pyatspi/busutils/bus.py
@@ -42,18 +42,18 @@ class _AccessibilityBus (_bus.BusConnection):
self._signal_queue = _queue.Queue ()
- gobject.idle_add(self._event_dispatch)
def _event_dispatch (self):
while not self._signal_queue.empty():
(func, args, kwargs) = self._signal_queue.get (False)
func (*args, **kwargs)
- return True
+ return False
def add_signal_receiver (self, func, *args, **kwargs):
def wrapper (*iargs, **ikwargs):
self._signal_queue.put ((func, iargs, ikwargs))
+ gobject.idle_add(self._event_dispatch)
return _bus.BusConnection.add_signal_receiver (self, wrapper, *args, **kwargs)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]