projects
/
8sync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8153aa3
)
Scaffolding for handling the "when" of the run-request
author
Christopher Allan Webber
<cwebber@dustycloud.org>
Thu, 19 Nov 2015 20:28:58 +0000
(14:28 -0600)
committer
Christopher Allan Webber
<cwebber@dustycloud.org>
Thu, 19 Nov 2015 20:28:58 +0000
(14:28 -0600)
loopy.scm
patch
|
blob
|
history
diff --git
a/loopy.scm
b/loopy.scm
index 70d2d08ba7e2b42083452a3d5f30e8fe8f93f508..389d8e7a20dfe1583a8a911e47e39524eb4223eb 100644
(file)
--- a/
loopy.scm
+++ b/
loopy.scm
@@
-336,11
+336,16
@@
based on the results"
(proc-result (call-proc proc))
(enqueue
(lambda (run-request)
(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
;; @@: We might support delay-wrapped procedures here
(match proc-result
;; TODO: replace procedure with something that indicates