Parallel.TaskHandler th = new Parallel.ForEach(index.objects.entrySet())
.withFixedThreads(2 * OSUtils.getNumCores())
//.configurePoolSize(2*2*OSUtils.getNumCores(), 10)
.apply(new Parallel.F<Entry<String, Asset>, Void>() {
public Void apply (Entry<String, Asset> e) {
Asset asset = e.getValue();
File local = new File(targetDir, e.getKey());
File object = new File(objects, asset.hash.substring(0, 2) + "/" + asset.hash);
old.remove(local);