X-Git-Url: https://jxself.org/git/?p=8sync.git;a=blobdiff_plain;f=8sync%2Fagenda.scm;h=f20fffe889507a936a1e13df3d70f51c82c5a2ac;hp=db8180b0e0dede289f147f903f4de3b9d0844f1a;hb=ac6b7ab9cd36a5960f8289d6225a1c187debe777;hpb=2effa4a7e6169c2e1a611d7dde46519680f4adf7 diff --git a/8sync/agenda.scm b/8sync/agenda.scm index db8180b..f20fffe 100644 --- a/8sync/agenda.scm +++ b/8sync/agenda.scm @@ -71,6 +71,7 @@ 8sync 8sync-delay 8sync-run 8sync-run-at 8sync-run-delay 8sync-port 8sync-port-remove + 8sync-nowait catch-8sync @@ -138,7 +139,7 @@ Generally done automatically for the user through (make-agenda)." (schedule (make-schedule)) (time (gettimeofday)) (catch-handler #f) - (pre-unwind-handler #f)) + (pre-unwind-handler print-error-and-continue)) ;; TODO: document arguments "Make a fresh agenda." (make-agenda-intern queue prompt @@ -593,7 +594,7 @@ Possibly specify WHEN as the second argument." ;; TODO: Write (%run-immediately) -(define-syntax-rule (8sync-immediate body) +(define-syntax-rule (8sync-nowait body) "Run body asynchronously but ignore its result... forge ahead in our current function!" (8sync-abort-to-prompt @@ -602,7 +603,7 @@ forge ahead in our current function!" (list (make-run-request ;; See comment in 8sync-port (wrap (kont #f)) #f) - (make-run-request body #f)))))) + (make-run-request (lambda () body) #f)))))) (define-syntax-rule (catch-8sync exp (handler-key handler) ...) (catch '8sync-caught-error @@ -742,7 +743,7 @@ Also handles sleeping when all we have to do is wait on the schedule." #:key ;; @@: Should we make stop-on-nothing-to-do ;; the default stop-condition? - stop-condition + (stop-condition stop-on-nothing-to-do) (get-time gettimeofday) (handle-ports update-agenda-from-select!)) ;; TODO: Document fields