]> code.ossystems Code Review - openembedded-core.git/commitdiff
package: Ensure we iterate all the pool objects
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 May 2013 12:28:05 +0000 (12:28 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 28 Jun 2013 09:01:01 +0000 (10:01 +0100)
There is the possibility that if we don't iterate through the multiprocessing
pool objects we might not catch return codes and this could lead to hung/zombie
processes either temproarily or on a wider scale. Adding this certainly doesn't
hurt anything and is better practise so we might as well do it.

Its not 100% clear if this fixes some issues or not.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index f25f5671e5284513837fc225a697614a1124d0c1..8e6029a0a30099ae6f0c27e26b32aa160a633e8d 100644 (file)
@@ -906,7 +906,7 @@ python split_and_strip_files () {
         import multiprocessing
         nproc = multiprocessing.cpu_count()
         pool = bb.utils.multiprocessingpool(nproc)
-        processed = pool.imap(oe.package.runstrip, sfiles)
+        processed = list(pool.imap(oe.package.runstrip, sfiles))
         pool.close()
         pool.join()
 
@@ -1265,7 +1265,7 @@ python package_do_filedeps() {
     import multiprocessing
     nproc = multiprocessing.cpu_count()
     pool =  bb.utils.multiprocessingpool(nproc)
-    processed = pool.imap(oe.package.filedeprunner, pkglist)
+    processed = list(pool.imap(oe.package.filedeprunner, pkglist))
     pool.close()
     pool.join()