[oe-commits] [openembedded-core] 07/10: lib/oe/utils: Drop now unused multiprocess_exec
git at git.openembedded.org
git at git.openembedded.org
Mon Jul 23 12:43:49 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 3f77762d28b806146013249471467a56642c9f4f
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri Jul 20 15:19:57 2018 +0000
lib/oe/utils: Drop now unused multiprocess_exec
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oe/utils.py | 34 ----------------------------------
1 file changed, 34 deletions(-)
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 753b577..814ac0f 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -248,40 +248,6 @@ def execute_pre_post_process(d, cmds):
bb.note("Executing %s ..." % cmd)
bb.build.exec_func(cmd, d)
-def multiprocess_exec(commands, function):
- import signal
- import multiprocessing
-
- if not commands:
- return []
-
- def init_worker():
- signal.signal(signal.SIGINT, signal.SIG_IGN)
-
- fails = []
-
- def failures(res):
- fails.append(res)
-
- nproc = min(multiprocessing.cpu_count(), len(commands))
- pool = bb.utils.multiprocessingpool(nproc, init_worker)
-
- try:
- mapresult = pool.map_async(function, commands, error_callback=failures)
-
- pool.close()
- pool.join()
- results = mapresult.get()
- except KeyboardInterrupt:
- pool.terminate()
- pool.join()
- raise
-
- if fails:
- raise fails[0]
-
- return results
-
# For each item in items, call the function 'target' with item as the first
# argument, extraargs as the other arguments and handle any exceptions in the
# parent thread
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list