From 6ad6dbefe79196f0d7bb717fa9279837083e9113 Mon Sep 17 00:00:00 2001 From: Anthony King Date: Wed, 8 Apr 2015 13:22:30 +0100 Subject: [PATCH] forall: use a generator to map the Pool Before, a list was generated, which is why there was a massive delay. Using a generator will allow processes to start straight away Change-Id: Ia325b0b340cc328c08c9bcc92a6709bbdaf6a664 --- subcmds/forall.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subcmds/forall.py b/subcmds/forall.py index 7771ec16..88b23fbd 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py @@ -212,8 +212,8 @@ without iterating through the remaining projects. config = self.manifest.manifestProject.config results_it = pool.imap( DoWorkWrapper, - [[mirror, opt, cmd, shell, cnt, config, self._SerializeProject(p)] - for cnt, p in enumerate(projects)] + ([mirror, opt, cmd, shell, cnt, config, self._SerializeProject(p)] + for cnt, p in enumerate(projects)) ) pool.close() for r in results_it: