From: Christopher Allan Webber Date: Sat, 12 Dec 2015 02:03:53 +0000 (-0600) Subject: Return a value to the continuations from various %8sync-* calls X-Git-Tag: v0.1.0~21 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=e7161a37ba465d41bb9fde3ba1d3a7a3f4f8da42;p=8sync.git Return a value to the continuations from various %8sync-* calls Just doing (kont) would result in an error at times. * 8sync/agenda.scm (%8sync-port, %8sync-port-remove, %8sync-immediate): Updated with fix. --- diff --git a/8sync/agenda.scm b/8sync/agenda.scm index 3bd5787..af5ef3c 100644 --- a/8sync/agenda.scm +++ b/8sync/agenda.scm @@ -575,14 +575,20 @@ Possibly specify WHEN as the second argument." (make-async-request (lambda (kont) (list (make-port-request port port-request-args ...) - (make-run-request kont #f)))))) + (make-run-request + ;; What's with returning #f to kont? + ;; Otherwise we sometimes get errors like + ;; "Zero values returned to single-valued continuation"" + (wrap (kont #f)) #f)))))) (define-syntax-rule (%8sync-port-remove port) (%8sync-abort-to-prompt (make-async-request (lambda (kont) (list (make-port-remove-request port) - (make-run-request kont #f)))))) + (make-run-request + ;; See comment in %8sync-port + (wrap (kont #f)) #f)))))) ;; TODO: Write (%run-immediately) @@ -593,7 +599,9 @@ forge ahead in our current function!" (%8sync-abort-to-prompt (make-async-request (lambda (kont) - (list (make-run-request kont #f) + (list (make-run-request + ;; See comment in %8sync-port + (wrap (kont #f)) #f) (make-run-request body #f)))))) (define-syntax-rule (catch-8sync exp (handler-key handler) ...)