Patchwork [bitbake-devel] server/process: Optimise latency when finishing idle functions

login
register
mail settings
Submitter Richard Purdie
Date March 10, 2014, 12:59 a.m.
Message ID <1394413150.7883.21.camel@ted>
Download mbox | patch
Permalink /patch/68351/
State New
Headers show

Comments

Richard Purdie - March 10, 2014, 12:59 a.m.
When idle functions finish, its likely we have some other work
to do, so don't sleep in the select call but instead, skip it.
This removes small amounts of latency in common commands.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---

Patch

diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 07688a2..577c250 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -128,6 +128,7 @@  class ProcessServer(Process, BaseImplServer):
                 retval = function(self, data, False)
                 if retval is False:
                     del self._idlefuns[function]
+                    nextsleep = None
                 elif retval is True:
                     nextsleep = None
                 elif nextsleep is None: