[diffoscope] 02/10: parallel: adds comparison_pool class

Juliana Oliveira jwnx-guest at moszumanska.debian.org
Sun Jan 14 21:04:34 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 d9119913663c9ed6053e788821c40ed978db6fa4
Author: Juliana Oliveira <juliana.orod at gmail.com>
Date:   Tue Jan 9 00:56:36 2018 -0200

    parallel: adds comparison_pool class
    
    Signed-off-by: Juliana Oliveira <juliana.orod at gmail.com>
---
 diffoscope/parallel/comparison_pool.py | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/diffoscope/parallel/comparison_pool.py b/diffoscope/parallel/comparison_pool.py
new file mode 100644
index 0000000..bbc8804
--- /dev/null
+++ b/diffoscope/parallel/comparison_pool.py
@@ -0,0 +1,19 @@
+import logging
+import dill
+
+from pathos.multiprocessing import ProcessingPool as Pool
+from diffoscope.config import Config
+
+
+logger = logging.getLogger(__name__)
+
+
+class ComparisonPool(object):
+
+  def __init__(self):
+    self._pool_size = Config().jobs
+    self._pool = Pool(nodes=self._pool_size)
+    logger.debug("ComparisonPool initialized. Pool size: %d", self._pool_size)
+
+
+pool = ComparisonPool()

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


More information about the diffoscope mailing list