summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/Scheduler.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index d13e62266..6412d821d 100644
--- a/pym/_emerge/Scheduler.py
+++ b/pym/_emerge/Scheduler.py
@@ -752,6 +752,13 @@ class Scheduler(PollScheduler):
self._task_queues.fetch.add(prefetcher)
prefetchers[pkg] = prefetcher
+ # Start the first prefetcher immediately so that self._task()
+ # won't discard it. This avoids a case where the first
+ # prefetcher is discarded, causing the second prefetcher to
+ # occupy the fetch queue before the first fetcher has an
+ # opportunity to execute.
+ self._task_queues.fetch.schedule()
+
def _create_prefetcher(self, pkg):
"""
@return: a prefetcher, or None if not applicable