]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/utils: Drop now unused multiprocess_exec
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 20 Jul 2018 15:19:57 +0000 (15:19 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 24 Jul 2018 10:52:07 +0000 (11:52 +0100)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/utils.py

index 753b5775550be245022cd0543d2b63002ba067db..814ac0fd51cdc2b4fd1317019d1236737efe0355 100644 (file)
@@ -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