From 08fb307989f2696ddbd2ad535f55558c577b2fdb Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Mon, 2 Jan 2017 16:33:10 -0600 Subject: [PATCH] agenda: Rename start-agenda to run-agenda. * 8sync/agenda.scm (run-agenda): Renamed from start-agenda. * 8sync/actors.scm: * tests/test-agenda.scm: Update all callers. --- 8sync/actors.scm | 4 ++-- 8sync/agenda.scm | 10 +++++----- tests/test-agenda.scm | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/8sync/actors.scm b/8sync/actors.scm index bf1093a..37f321b 100644 --- a/8sync/actors.scm +++ b/8sync/actors.scm @@ -731,7 +731,7 @@ its '*cleanup* action handler." (let* ((queue (list->q initial-tasks)) (agenda (make-agenda #:pre-unwind-handler print-error-and-continue #:queue queue))) - (start-agenda agenda))) + (run-agenda agenda))) ;; Run cleanup (lambda () (when cleanup @@ -740,7 +740,7 @@ its '*cleanup* action handler." (define (run-hive-cleanup hive) (let ((queue (list->q (list (bootstrap-message hive (actor-id hive) '*cleanup-all*))))) - (start-agenda + (run-agenda (make-agenda #:queue queue)))) (define (bootstrap-message hive to-id action . message-body-args) diff --git a/8sync/agenda.scm b/8sync/agenda.scm index 3aa43da..1d25156 100644 --- a/8sync/agenda.scm +++ b/8sync/agenda.scm @@ -62,7 +62,7 @@ stop-on-nothing-to-do %current-agenda-prompt - start-agenda agenda-run-once!)) + run-agenda agenda-run-once!)) ;;; Agenda definition @@ -553,10 +553,10 @@ on suspendable ports." (= 0 (hash-count (const #t) (agenda-write-port-map agenda))))) -(define* (start-agenda agenda - #:key (stop-condition stop-on-nothing-to-do) - ;; For live hacking madness, etc - (post-run-hook #f)) +(define* (run-agenda agenda + #:key (stop-condition stop-on-nothing-to-do) + ;; For live hacking madness, etc + (post-run-hook #f)) ;; TODO: Document fields "Start up the AGENDA" (install-suspendable-ports!) diff --git a/tests/test-agenda.scm b/tests/test-agenda.scm index ae53e55..a26c6b7 100644 --- a/tests/test-agenda.scm +++ b/tests/test-agenda.scm @@ -267,16 +267,16 @@ (run-it dummy-func)) (with-fresh-speaker - (start-agenda (make-agenda #:queue (make-q* run-dummy)) - #:stop-condition (true-after-n-times 2)) + (run-agenda (make-agenda #:queue (make-q* run-dummy)) + #:stop-condition (true-after-n-times 2)) (test-equal (get-spoken) '("I bet I can make you say you're a dummy!\n" "I'm a dummy\n"))) ;; should only do the first one after one round though (with-fresh-speaker - (start-agenda (make-agenda #:queue (make-q* run-dummy)) - #:stop-condition (true-after-n-times 1)) + (run-agenda (make-agenda #:queue (make-q* run-dummy)) + #:stop-condition (true-after-n-times 1)) (test-equal (get-spoken) '("I bet I can make you say you're a dummy!\n"))) -- 2.31.1