From: Ian Jackson Subject: [OSSTEST PATCH 10/13] Planner: ms-queuedaemon: Break out queuerun-finished/ Date: Wed, 2 Sep 2015 16:45:16 +0100 Message-ID: <1441208719-31336-11-git-send-email-ian.jackson@eu.citrix.com> References: <1441208719-31336-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.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZXAEy-0000al-OK for xen-devel@lists.xenproject.org; Wed, 02 Sep 2015 15:46:24 +0000 In-Reply-To: <1441208719-31336-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 --- ms-queuedaemon | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ms-queuedaemon b/ms-queuedaemon index 779ede0..1def285 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