X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=8sync%2Fagenda.scm;h=b14f7b1204b2752ba9609d0837bb0444e8f87ea8;hb=15ef27631b1f1fe71fdc77c8da1196d7604cfdac;hp=ae9ddd6059556fc781d69bae7bcc3cd902db6681;hpb=cef48f426e254f8c05566a50669bf195560e0d96;p=8sync.git diff --git a/8sync/agenda.scm b/8sync/agenda.scm index ae9ddd6..b14f7b1 100644 --- a/8sync/agenda.scm +++ b/8sync/agenda.scm @@ -62,7 +62,7 @@ 8sync-delay 8sync-run 8sync-run-at 8sync-run-delay - 8sync-nowait + 8sync 8sleep ;; used for introspecting the error, but a method for making @@ -527,7 +527,7 @@ return the wrong thing via (8sync) and trip themselves up." ;; TODO: Write (%run-immediately) -(define-syntax-rule (8sync-nowait body) +(define-syntax-rule (8sync body) "Run body asynchronously but ignore its result... forge ahead in our current function!" (8sync-abort-to-prompt @@ -545,6 +545,13 @@ forge ahead in our current function!" (define-syntax-rule (8sleep time) (8sync-delay 'no-op time)) +;; Voluntarily yield execution +(define (yield) ; @@: should this be define-inlinable? + "Voluntarily yield execution to the scheduler." + (8sync-abort-to-prompt + (make-async-request + (lambda (kont) + (make-run-request (lambda () (kont #f)) #f))))) ;;; Execution of agenda, and current agenda