[diffoscope] 04/10: difference: from_command_exc: adds pool.map on command execution

Juliana Oliveira jwnx-guest at moszumanska.debian.org
Sun Jan 14 21:04:35 CET 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 84d02ba431a655d29b1381e9fd84dd02da54ce7e
Author: Juliana Oliveira <juliana.orod at gmail.com>
Date:   Tue Jan 9 01:00:11 2018 -0200

    difference: from_command_exc: adds pool.map on command execution
    
    Signed-off-by: Juliana Oliveira <juliana.orod at gmail.com>
---
 diffoscope/difference.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/diffoscope/difference.py b/diffoscope/difference.py
index be4af7c..965e395 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)
+
+        [[feeder1, command1, excluded1],
+         [feeder2, command2, exclude2]] = pool.map(command_and_feeder,
+                                                   [path1, path2])
+
         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 diffoscope mailing list