diff options
authorZac Medico <zmedico@gentoo.org>2011-07-17 18:16:20 (GMT)
committerZac Medico <zmedico@gentoo.org>2011-07-17 18:16:20 (GMT)
commitef58bc7573ddce5e3a5466eea50160b81de8edf4 (patch)
parentFix a typo in a doc string. (diff)
Scheduler: allow concurrent fetch with --jobs > 1
This reverts behavior from bug #375331 (commit f07f8386e945b48358c11c121960e4833c539752) for cases in which --jobs is greater than 1. We can add a separate --fetch-jobs option later, but for now, this preserves previous behavior for --jobs > 1.
1 files changed, 12 insertions, 3 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index 135e37a..2574d3d 100644
--- a/pym/_emerge/Scheduler.py
+++ b/pym/_emerge/Scheduler.py
@@ -552,10 +552,19 @@ class Scheduler(PollScheduler):
def _schedule_fetch(self, fetcher):
- Schedule a fetcher on the fetch queue, in order to
- serialize access to the fetch log.
+ Schedule a fetcher, in order to control the number of concurrent
+ fetchers. If self._max_jobs is greater than 1 then the fetch
+ queue is bypassed and the fetcher is started immediately,
+ otherwise it is added to the front of the parallel-fetch queue.
+ NOTE: The parallel-fetch queue is currently used to serialize
+ access to the parallel-fetch log, so changes in the log handling
+ would be required before it would be possible to enable
+ concurrent fetching within the parallel-fetch queue.
- self._task_queues.fetch.addFront(fetcher)
+ if self._max_jobs > 1:
+ fetcher.start()
+ else:
+ self._task_queues.fetch.addFront(fetcher)
def _schedule_setup(self, setup_phase):