projects
/
8sync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48174b4
)
agenda: Add yield procedure.
author
Christopher Allan Webber
<cwebber@dustycloud.org>
Sat, 10 Dec 2016 03:03:47 +0000
(21:03 -0600)
committer
Christopher Allan Webber
<cwebber@dustycloud.org>
Sat, 10 Dec 2016 03:03:47 +0000
(21:03 -0600)
* 8sync/agenda.scm (yield): New variable.
8sync/agenda.scm
patch
|
blob
|
history
diff --git
a/8sync/agenda.scm
b/8sync/agenda.scm
index e5b5160b8460ba69b6ecacb8b4e2254630bfbf8b..b14f7b1204b2752ba9609d0837bb0444e8f87ea8 100644
(file)
--- 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)))))
\f
;;; Execution of agenda, and current agenda