summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-06 18:02:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-07 10:57:43 +0100
commit7e122178dbae6374c7143a6c83090ec1ef09e7e6 (patch)
treec31857918620ebefdb67b5e3bec15ecf056a2712
parent159aee22dc7d8c78ca2920dfc58d8bf9238ef720 (diff)
downloadpoky-7e122178dbae6374c7143a6c83090ec1ef09e7e6.tar.gz
bitbake/process.py: Ensure queued UI events are queued right before we add our own handler
(Bitbake rev: c7a9ef70ba91d47d53074e8d78cbc52f396144a7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/server/process.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 3a0706c498..ba9133639d 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -83,15 +83,14 @@ class ProcessServer(Process):
83 self.keep_running = Event() 83 self.keep_running = Event()
84 self.keep_running.set() 84 self.keep_running.set()
85 85
86 for event in bb.event.ui_queue:
87 self.event_queue.put(event)
88
89 def register_idle_function(self, function, data): 86 def register_idle_function(self, function, data):
90 """Register a function to be called while the server is idle""" 87 """Register a function to be called while the server is idle"""
91 assert hasattr(function, '__call__') 88 assert hasattr(function, '__call__')
92 self._idlefunctions[function] = data 89 self._idlefunctions[function] = data
93 90
94 def run(self): 91 def run(self):
92 for event in bb.event.ui_queue:
93 self.event_queue.put(event)
95 self.event_handle = bb.event.register_UIHhandler(self) 94 self.event_handle = bb.event.register_UIHhandler(self)
96 bb.cooker.server_main(self.cooker, self.main) 95 bb.cooker.server_main(self.cooker, self.main)
97 96