[oe-commits] [bitbake] 01/05: server/process: Fix waitEvent() calls with 0 timeout

git at git.openembedded.org git at git.openembedded.org
Fri Jul 7 22:58:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 412bfab8721ea317898a1974f6a7a0d0bea763df
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri Jul 7 14:38:54 2017 +0100

    server/process: Fix waitEvent() calls with 0 timeout
    
    You might think Queue.Queue.get(True, 0) would return an event immediately
    if present and otherwise return. It doesn't, it immediately "times out"
    and returns with nothing from the queue.
    
    The behaviour we want is not to wait but return anything present which is
    what .get(False) does so map to this.
    
    This fixes some odd behaviour observed in some of the tinfoil selftests.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/server/process.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index c3c1450..9ca2b69 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -253,6 +253,8 @@ class ProcessEventQueue(multiprocessing.queues.Queue):
         try:
             if not self.server.is_alive():
                 return self.getEvent()
+            if timeout == 0:
+                return self.get(False)
             return self.get(True, timeout)
         except Empty:
             return None

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list