[diffoscope] 05/06: difference: from_command_exc: added pool.map on command execution

Juliana Oliveira jwnx-guest at moszumanska.debian.org
Tue Jan 9 04:04:26 UTC 2018


This is an automated email from the git hooks/post-receive script.

jwnx-guest pushed a commit to branch jwnx_parallel_diffoscope
in repository diffoscope.

commit ceecdec47ddfd377094bff06b3b581d54ffeb18d
Author: Juliana Oliveira <juliana.orod at gmail.com>
Date:   Tue Jan 9 01:00:11 2018 -0200

    difference: from_command_exc: added pool.map on command execution
---
 diffoscope/difference.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/diffoscope/difference.py b/diffoscope/difference.py
index be4af7c..a0893dc 100644
--- a/diffoscope/difference.py
+++ b/diffoscope/difference.py
@@ -24,6 +24,7 @@ from . import feeders
 from .exc import RequiredToolNotFound
 from .diff import diff, reverse_unified_diff, diff_split_lines
 from .excludes import command_excluded
+from diffoscope.parallel.comparison_pool import pool
 
 logger = logging.getLogger(__name__)
 
@@ -247,8 +248,11 @@ class Difference(object):
                 command.start()
             return feeder, command, False
 
-        feeder1, command1, excluded1 = command_and_feeder(path1)
-        feeder2, command2, excluded2 = command_and_feeder(path2)
+        result = pool.map(command_and_feeder, [path1, path2])
+
+        feeder1, command1, excluded1 = result[0]
+        feeder2, command2, excluded2 = result[1]
+
         if not feeder1 or not feeder2:
             assert excluded1 or excluded2
             return None, True

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git



More information about the Reproducible-commits mailing list