From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RvJHp-0000W8-SF for garchives@archives.gentoo.org; Thu, 09 Feb 2012 01:59:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E4C91E05A4; Thu, 9 Feb 2012 01:58:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id ADD2FE05A4 for ; Thu, 9 Feb 2012 01:58:53 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 59E281B4038 for ; Thu, 9 Feb 2012 01:58:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 10DF7E5400 for ; Thu, 9 Feb 2012 01:58:51 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/Scheduler.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: e414834041d39f14211ede7df8ec5ff527673967 Date: Thu, 9 Feb 2012 01:58:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: a5a453ee-c87a-465d-ac0a-0e1ac6b9e9f6 X-Archives-Hash: 527c18594dd57c8566f8d1abc4a27f36 commit: e414834041d39f14211ede7df8ec5ff527673967 Author: Zac Medico gentoo org> AuthorDate: Thu Feb 9 01:58:28 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Feb 9 01:58:28 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3De4148340 Scheduler: tweak _add_prefetchers Since commit 4620d6aba1c5c10344e311585516ee43819b703c, the first prefetcher is started as soon as it's added to the task queue. --- pym/_emerge/Scheduler.py | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index d3f7761..6502f71 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -733,15 +733,13 @@ class Scheduler(PollScheduler): continue prefetcher =3D self._create_prefetcher(pkg) if prefetcher is not None: - self._task_queues.fetch.add(prefetcher) + # This will 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. prefetchers[pkg] =3D 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() + self._task_queues.fetch.add(prefetcher) =20 def _create_prefetcher(self, pkg): """