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 1QoTjx-0003sq-0Z for garchives@archives.gentoo.org; Wed, 03 Aug 2011 05:11:33 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DFB3521C05F; Wed, 3 Aug 2011 05:11:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B280F21C05F for ; Wed, 3 Aug 2011 05:11:23 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4AFF41B4031 for ; Wed, 3 Aug 2011 05:11:23 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 437DB8003C for ; Wed, 3 Aug 2011 05:11:22 +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: <56099907f2fb5bbf8319baa961f97c9356995c09.zmedico@gentoo> 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: 56099907f2fb5bbf8319baa961f97c9356995c09 Date: Wed, 3 Aug 2011 05:11:22 +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: X-Archives-Hash: 92cb78161410d9a27e54470f4a703ca1 commit: 56099907f2fb5bbf8319baa961f97c9356995c09 Author: Zac Medico gentoo org> AuthorDate: Wed Aug 3 05:10:47 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Aug 3 05:10:47 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D56099907 Scheduler: fix parallel-fetch order with --jobs=3D1 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. --- pym/_emerge/Scheduler.py | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index d13e622..6412d82 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] =3D prefetcher =20 + # 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