X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=8sync%2Fagenda.scm;fp=8sync%2Fagenda.scm;h=b14f7b1204b2752ba9609d0837bb0444e8f87ea8;hb=15ef27631b1f1fe71fdc77c8da1196d7604cfdac;hp=e5b5160b8460ba69b6ecacb8b4e2254630bfbf8b;hpb=48174b48346c194142c4f1204cae60a5d1cc80c4;p=8sync.git diff --git a/8sync/agenda.scm b/8sync/agenda.scm index e5b5160..b14f7b1 100644 --- a/8sync/agenda.scm +++ b/8sync/agenda.scm @@ -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