summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-07-17 11:16:20 -0700
committerZac Medico <zmedico@gentoo.org>2011-07-17 11:16:20 -0700
commitef58bc7573ddce5e3a5466eea50160b81de8edf4 (patch)
tree01c7dd99f758964d3e5dbdfd05ffe74c240d1362
parent1040aaeaf2023717d99f40377583ca7453f60d33 (diff)
downloadportage-ef58bc7573ddce5e3a5466eea50160b81de8edf4.tar.gz
portage-ef58bc7573ddce5e3a5466eea50160b81de8edf4.tar.bz2
portage-ef58bc7573ddce5e3a5466eea50160b81de8edf4.zip
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.
-rw-r--r--pym/_emerge/Scheduler.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index 135e37a2f..2574d3de4 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):
"""