diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-20 15:19:57 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-24 11:52:07 +0100 |
commit | f3b30def2cd1c9ede7630489c3949a45b6eba6ed (patch) | |
tree | 1243fe14950354d57bf0f82e71802ece5516d289 /meta/lib | |
parent | aa8260adf53139d776a2affe6118d28b295c1fab (diff) | |
download | openembedded-core-f3b30def2cd1c9ede7630489c3949a45b6eba6ed.tar.gz openembedded-core-f3b30def2cd1c9ede7630489c3949a45b6eba6ed.tar.bz2 openembedded-core-f3b30def2cd1c9ede7630489c3949a45b6eba6ed.zip |
lib/oe/utils: Drop now unused multiprocess_exec
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/utils.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index 753b577555..814ac0fd51 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 |