aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Erdmann <dywi@mailerd.de>2013-09-03 17:42:42 +0200
committerAndré Erdmann <dywi@mailerd.de>2013-09-03 17:42:42 +0200
commit55bf1d09ba2bcb527cf953276a9c87415ee052a1 (patch)
treea1823a4bd22ffde201869046944997f6c93046d7 /roverlay/util
parentdistmap, get_distfile_slot(): make entry volatile (diff)
downloadR_overlay-55bf1d09ba2bcb527cf953276a9c87415ee052a1.tar.gz
R_overlay-55bf1d09ba2bcb527cf953276a9c87415ee052a1.tar.bz2
R_overlay-55bf1d09ba2bcb527cf953276a9c87415ee052a1.zip
HashPool: extend()
Diffstat (limited to 'roverlay/util')
-rw-r--r--roverlay/util/hashpool.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/roverlay/util/hashpool.py b/roverlay/util/hashpool.py
index 61d8336..29b61f5 100644
--- a/roverlay/util/hashpool.py
+++ b/roverlay/util/hashpool.py
@@ -83,6 +83,16 @@ class HashPool ( object ):
self._jobs [backref] = HashJob ( filepath, hashdict )
# --- end of add (...) ---
+ def extend ( self, iterable ):
+ for backref, filepath in iterable:
+ self._jobs [backref] = HashJob ( filepath, None )
+ # --- end of extend (...) ---
+
+ def extend_with_hashdict ( self, iterable ):
+ for backref, filepath, hashdict in iterable:
+ self._jobs [backref] = HashJob ( filepath, hashdict )
+ # --- end of extend_with_hashdict (...) ---
+
def get_executor ( self ):
return self.executor_cls ( self.max_workers )
# --- end of get_executor (...) ---