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 1RvJTZ-0002Jo-93 for garchives@archives.gentoo.org; Thu, 09 Feb 2012 02:11:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BF17DE06AF; Thu, 9 Feb 2012 02:11:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8DFEDE06AF for ; Thu, 9 Feb 2012 02:11:01 +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 C07041B403A for ; Thu, 9 Feb 2012 02:11:00 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 7716EE5400 for ; Thu, 9 Feb 2012 02:10:59 +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/PollScheduler.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: cda8009b77feda580ee57f576d6fcaadc9ca65fc Date: Thu, 9 Feb 2012 02:10:59 +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: 1844307e-6c56-4c6d-8665-0bb460085fe2 X-Archives-Hash: a0b9e5d2a7e6ae26483aa28723e53f59 commit: cda8009b77feda580ee57f576d6fcaadc9ca65fc Author: Zac Medico gentoo org> AuthorDate: Thu Feb 9 02:10:38 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Feb 9 02:10:38 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dcda8009b PollScheduler: remove EventLoop._schedule hook PollScheduler and subclasses be should already be calling self._schedule() when necessary. --- pym/_emerge/PollScheduler.py | 17 +++++------------ 1 files changed, 5 insertions(+), 12 deletions(-) diff --git a/pym/_emerge/PollScheduler.py b/pym/_emerge/PollScheduler.py index ee00f10..ab65054 100644 --- a/pym/_emerge/PollScheduler.py +++ b/pym/_emerge/PollScheduler.py @@ -46,10 +46,6 @@ class EventLoop(object): self._poll_obj =3D create_poll_instance() self._polling =3D False =09 =20 - def _schedule(self): - pass - - def _poll(self, timeout=3DNone): if self._polling: return @@ -107,12 +103,11 @@ class EventLoop(object): StopIteration if timeout is None and there are no file descriptors to poll. """ - if not self._poll_event_handlers: - self._schedule() - if timeout is None and \ - not self._poll_event_handlers: - raise StopIteration( - "timeout is None and there are no poll() event handlers") + + if timeout is None and \ + not self._poll_event_handlers: + raise StopIteration( + "timeout is None and there are no poll() event handlers") =20 # The following error is known to occur with Linux kernel versions # less than 2.6.24: @@ -367,7 +362,6 @@ class PollScheduler(object): "source_remove", "timeout_add", "unregister") =20 def __init__(self): - super(PollScheduler, self).__init__() self._terminated =3D threading.Event() self._terminated_tasks =3D False self._max_jobs =3D 1 @@ -376,7 +370,6 @@ class PollScheduler(object): self._scheduling =3D False self._background =3D False self._event_loop =3D EventLoop() - self._event_loop._schedule =3D self._schedule self.sched_iface =3D self._sched_iface_class( idle_add=3Dself._event_loop.idle_add, io_add_watch=3Dself._event_loop.io_add_watch,