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 1RvQ43-00043Q-VN for garchives@archives.gentoo.org; Thu, 09 Feb 2012 09:13:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A8EACE058E; Thu, 9 Feb 2012 09:13:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 70E87E058E for ; Thu, 9 Feb 2012 09:13:08 +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 AB0491B4018 for ; Thu, 9 Feb 2012 09:13:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 65D4CE53FF for ; Thu, 9 Feb 2012 09:13:06 +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: <7a6c34cc6bd6eb20a97e05347f87a0157f4ae58a.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/AsynchronousTask.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 7a6c34cc6bd6eb20a97e05347f87a0157f4ae58a Date: Thu, 9 Feb 2012 09:13:06 +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: 4dee9638-988c-4de0-b82e-0c70f4ac7020 X-Archives-Hash: d760648450214efe2e856d0f58fae407 commit: 7a6c34cc6bd6eb20a97e05347f87a0157f4ae58a Author: Zac Medico gentoo org> AuthorDate: Thu Feb 9 09:12:40 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Feb 9 09:12:40 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D7a6c34cc AsynchronousTask: exit listeners reverse order This should fix a Scheduler hang which is triggered when that merge queue, a SequentialTaskQueue, doesn't decrement its merge count until after other exit listeners have already run. --- pym/_emerge/AsynchronousTask.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/pym/_emerge/AsynchronousTask.py b/pym/_emerge/AsynchronousTa= sk.py index 4aa5980..d57ccab 100644 --- a/pym/_emerge/AsynchronousTask.py +++ b/pym/_emerge/AsynchronousTask.py @@ -129,7 +129,11 @@ class AsynchronousTask(SlotObject): self._exit_listener_stack =3D self._exit_listeners self._exit_listeners =3D None =20 - self._exit_listener_stack.reverse() + # Execute exit listeners in reverse order, so that + # the last added listener is executed first. This + # allows SequentialTaskQueue to decrement its running + # task count as soon as one of its tasks exits, so that + # the value is accurate when other listeners execute. while self._exit_listener_stack: self._exit_listener_stack.pop()(self) =20