[diffoscope] 02/06: parallel: added comparison_pool class

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

    parallel: added comparison_pool class
---
 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