From: Christopher Allan Webber Date: Thu, 19 Nov 2015 20:28:58 +0000 (-0600) Subject: Scaffolding for handling the "when" of the run-request X-Git-Tag: v0.1.0~150 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=b990dc5b4ff43cf5b4f47b7f9fd2274f6bf16b83;p=8sync.git Scaffolding for handling the "when" of the run-request --- diff --git a/loopy.scm b/loopy.scm index 70d2d08..389d8e7 100644 --- a/loopy.scm +++ b/loopy.scm @@ -336,11 +336,16 @@ based on the results" (proc-result (call-proc proc)) (enqueue (lambda (run-request) - (cond - ((run-request-when run-request) - (error "TODO")) - (else - (enq! next-queue (run-request-proc run-request))))))) + (match (run-request-when run-request) + ((? time-delta? _) + (error "TODO")) + ((? integer? sec) + (let ((time (cons sec 0))) + (error "Also TODO"))) + (((? integer? sec) . (? integer? usec)) + (error "Also also TODO")) + (#f + (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