diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-11-18 22:47:36 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:43 +0000 |
commit | 7c9444e9a58438058ec577bd8c2e51820c98072d (patch) | |
tree | 55074d2c00afa924707bb5b5d30b22bc6688594d /bitbake/lib/bb/ui/uievent.py | |
parent | 95d2f56126d459b9e7f000d22ed7c1206d1a8f68 (diff) | |
download | openembedded-core-7c9444e9a58438058ec577bd8c2e51820c98072d.tar.gz openembedded-core-7c9444e9a58438058ec577bd8c2e51820c98072d.tar.bz2 openembedded-core-7c9444e9a58438058ec577bd8c2e51820c98072d.tar.xz openembedded-core-7c9444e9a58438058ec577bd8c2e51820c98072d.zip |
cache: sync the cache file to disk in the background
This version uses a thread rather than a process, to avoid problems with
waitpid handling. This gives slightly less overall build time reduction than
the separate process for it did (this reduces a -c compile coreutils-native by
about 3 seconds, while the process reduced it by 7 seconds), however this time
is quite insignificant relative to a typical build.
The biggest issue with non-backgrounded syncing is the perceived delay before
work begins, and this resolves that without breaking anything, or so it seems.
(Bitbake rev: 5ab6c5c7b007b8c77c751582141afc07c183d672)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/ui/uievent.py')
-rw-r--r-- | bitbake/lib/bb/ui/uievent.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bitbake/lib/bb/ui/uievent.py b/bitbake/lib/bb/ui/uievent.py index f1e4d791e..b404805d8 100644 --- a/bitbake/lib/bb/ui/uievent.py +++ b/bitbake/lib/bb/ui/uievent.py @@ -37,8 +37,8 @@ class BBUIEventQueue: self.BBServer = BBServer self.t = threading.Thread() - self.t.setDaemon(True)
- self.t.run = self.startCallbackHandler
+ self.t.setDaemon(True) + self.t.run = self.startCallbackHandler self.t.start() def getEvent(self): @@ -70,7 +70,7 @@ class BBUIEventQueue: def startCallbackHandler(self): server = UIXMLRPCServer() - self.host, self.port = server.socket.getsockname()
+ self.host, self.port = server.socket.getsockname() server.register_function( self.system_quit, "event.quit" ) server.register_function( self.queue_event, "event.send" ) @@ -83,7 +83,7 @@ class BBUIEventQueue: server.handle_request() server.server_close() - def system_quit( self ):
+ def system_quit( self ): """ Shut down the callback thread """ @@ -95,11 +95,11 @@ class BBUIEventQueue: class UIXMLRPCServer (SimpleXMLRPCServer): - def __init__( self, interface = ("localhost", 0) ):
+ def __init__( self, interface = ("localhost", 0) ): self.quit = False - SimpleXMLRPCServer.__init__( self,
- interface,
- requestHandler=SimpleXMLRPCRequestHandler,
+ SimpleXMLRPCServer.__init__( self, + interface, + requestHandler=SimpleXMLRPCRequestHandler, logRequests=False, allow_none=True) def get_request(self): @@ -121,4 +121,4 @@ class UIXMLRPCServer (SimpleXMLRPCServer): if request is None: return SimpleXMLRPCServer.process_request(self, request, client_address) -
+ |