From: Ian Jackson Subject: [OSSTEST PATCH 11/29] Planner: ms-queuedaemon: Break out queuerun-finished/ Date: Mon, 7 Sep 2015 17:08:09 +0100 Message-ID: <1441642107-21826-12-git-send-email-ian.jackson@eu.citrix.com> References: <1441642107-21826-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZYzAF-00071v-NQ for xen-devel@lists.xenproject.org; Mon, 07 Sep 2015 16:21:03 +0000 In-Reply-To: <1441642107-21826-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org This formalises the queue-completed interface, allowing parts outside the queuerun machinery to cleanly be notified when a queue is completed, and relieving the queuerun-perhaps-step of the need to know what to do for the end of any particular walker's queue. Currently there is still only one walker, `plan'. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- ms-queuedaemon | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ms-queuedaemon b/ms-queuedaemon index d51fd52..3026a64 100755 --- a/ms-queuedaemon +++ b/ms-queuedaemon @@ -172,6 +172,11 @@ proc runneeded-perhaps-start {} { queuerun-start plan } +proc queuerun-finished/plan {} { + runneeded-ensure-will 0 + report-plan plan +} + proc runneeded-ensure-polling {} { log-event runneeded-ensure-polling global polling_after queue c @@ -245,8 +250,7 @@ proc queuerun-perhaps-step {w} { if {![llength $queue_running]} { unset queue_running - runneeded-ensure-will 0 - report-plan $w + queuerun-finished/$w return } -- 1.7.10.4