|
@@ -7,13 +7,14 @@ import random
|
|
|
import multiprocessing
|
|
|
import glob
|
|
|
|
|
|
-def main(address, username, files):
|
|
|
- def do_compile_wrapper(filename):
|
|
|
- do_compile(address, filename, str(random.random()), filename, "PO", ["--debug"])
|
|
|
+def do_compile_wrapper(args):
|
|
|
+ address, username, filename = args
|
|
|
+ do_compile(address, filename, str(random.random()), filename, "PO", ["--debug"])
|
|
|
|
|
|
+def main(address, username, files):
|
|
|
p = multiprocessing.Pool(multiprocessing.cpu_count() * 2)
|
|
|
new_files = to_recompile(address, files)
|
|
|
- p.map(do_compile_wrapper, new_files)
|
|
|
+ p.map(do_compile_wrapper, [[address, username, f] for f in new_files])
|
|
|
link_and_load(address, username, files)
|
|
|
|
|
|
if __name__ == "__main__":
|