]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.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)
committerPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 8 Jul 2013 15:28:29 +0000 (16:28 +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.

(From OE-Core master rev: 89c8493d4d85044cd72af2756569d15e87cd5947)

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

index affa34e808ffc3bb9d62fec0dbcdf203c9a64707..551cafc51abc34bc764240681bbb0814324e85f0 100644 (file)
@@ -897,7 +897,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()
 
@@ -1249,7 +1249,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()