From: Torsten Werner Date: Tue, 6 Jul 2010 20:18:45 +0000 (+0000) Subject: show-new: multithreading support X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;ds=sidebyside;h=64b9b0367c33b94223ea38ce59fb10951ef48594;p=dak.git show-new: multithreading support Signed-off-by: Torsten Werner --- diff --git a/dak/show_new.py b/dak/show_new.py index 183c1bb5..9cb08901 100755 --- a/dak/show_new.py +++ b/dak/show_new.py @@ -37,6 +37,7 @@ from daklib.regexes import re_source_ext from daklib.config import Config from daklib import daklog from daklib.changesutils import * +from daklib.threadpool import ThreadPool # Globals Cnf = None @@ -243,12 +244,14 @@ def main(): examine_package.use_html=1 + threadpool = ThreadPool() for changes_file in changes_files: changes_file = utils.validate_changes_file_arg(changes_file, 0) if not changes_file: continue print "\n" + changes_file - do_pkg (changes_file) + threadpool.queueTask(do_pkg, changes_file) + threadpool.joinAll() files = set(os.listdir(cnf["Show-New::HTMLPath"])) to_delete = filter(lambda x: x.endswith(".html"), files.difference(sources))