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 1QiEra-0001hv-0H for garchives@archives.gentoo.org; Sun, 17 Jul 2011 00:05:38 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 83C2421C0E3; Sun, 17 Jul 2011 00:05:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5093721C0E3 for ; Sun, 17 Jul 2011 00:05:28 +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 BE9F61B4005 for ; Sun, 17 Jul 2011 00:05:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id CF4818003D for ; Sun, 17 Jul 2011 00:05:26 +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: <25d00e7bc361a659a729d5165fe580afcbd39664.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/Binpkg.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 25d00e7bc361a659a729d5165fe580afcbd39664 Date: Sun, 17 Jul 2011 00:05:26 +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: 9bbb777c81ebe8f268e1c0ad0692ddf2 commit: 25d00e7bc361a659a729d5165fe580afcbd39664 Author: Zac Medico gentoo org> AuthorDate: Sun Jul 17 00:04:08 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Jul 17 00:04:08 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D25d00e7b Binpkg: use fetch queue to cap fetch threads This is analogous to commit f07f8386e945b48358c11c121960e4833c539752 for bug #375331, but for fetching from binhosts. --- pym/_emerge/Binpkg.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py index b833419..bc6511e 100644 --- a/pym/_emerge/Binpkg.py +++ b/pym/_emerge/Binpkg.py @@ -126,7 +126,12 @@ class Binpkg(CompositeTask): short_msg =3D "emerge: (%s of %s) %s Fetch" % \ (pkg_count.curval, pkg_count.maxval, pkg.cpv) self.logger.log(msg, short_msg=3Dshort_msg) - self._start_task(fetcher, self._fetcher_exit) + + # Allow the Scheduler's fetch queue to control the + # number of concurrent fetchers. + fetcher.addExitListener(self._fetcher_exit) + self._task_queued(fetcher) + self.scheduler.fetch.schedule(fetcher) return =20 self._fetcher_exit(fetcher)