From: Christopher Allan Webber Date: Thu, 19 Nov 2015 19:28:30 +0000 (-0600) Subject: make the agenda use the run-request X-Git-Tag: v0.1.0~156 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=68e8784ebff46e4cfe588d6f13593709b51fe242;p=8sync.git make the agenda use the run-request --- diff --git a/loopy.scm b/loopy.scm index b93a1de..f11b6b8 100644 --- a/loopy.scm +++ b/loopy.scm @@ -309,15 +309,19 @@ based on the results" (let* ((proc (q-pop! queue)) (proc-result (call-proc proc)) (enqueue - (lambda (new-proc) - (enq! next-queue new-proc)))) + (lambda (run-request) + (cond + ((run-request-when run-request) + (error "TODO")) + (else + (enq! next-queue (run-request-proc run-request))))))) ;; @@: We might support delay-wrapped procedures here (match proc-result ;; TODO: replace procedure with something that indicates ;; intent to run. Use a (run foo) procedure - ((? procedure? new-proc) + ((? run-request? new-proc) (enqueue new-proc)) - (((? procedure? new-procs) ...) + (((? run-request? new-procs) ...) (for-each (lambda (new-proc) (enqueue new-proc))