summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5ead157)
* 8sync/agenda.scm (start-agenda): Add a post-run-hook keyword argument.
This permits more live hacking madness, as used in syncmud.
;; the default stop-condition?
(stop-condition stop-on-nothing-to-do)
(get-time gettimeofday)
;; the default stop-condition?
(stop-condition stop-on-nothing-to-do)
(get-time gettimeofday)
- (handle-ports update-agenda-from-select!))
+ (handle-ports update-agenda-from-select!)
+ ;; For live hacking madness, etc
+ (post-run-hook #f))
;; TODO: Document fields
"Start up the AGENDA"
(let loop ((agenda agenda))
;; TODO: Document fields
"Start up the AGENDA"
(let loop ((agenda agenda))
;; select'ing on ports.
;; We could compose over agenda-run-once and agenda-read-ports
(agenda-run-once agenda)))
;; select'ing on ports.
;; We could compose over agenda-run-once and agenda-read-ports
(agenda-run-once agenda)))
+ ;; @@: This relies on mutation at present on the queue, in the rare
+ ;; event it's used. If we ever switch to something more immutable,
+ ;; it should return a new modified agenda instead.
+ (if post-run-hook
+ (post-run-hook agenda))
(if (and stop-condition (stop-condition agenda))
'done
(let* ((agenda
(if (and stop-condition (stop-condition agenda))
'done
(let* ((agenda