Add fibers-promise-reset

This commit is contained in:
Christopher Baines 2024-10-17 22:28:26 +02:00
parent d53b91dd91
commit 38e5282546

View file

@ -60,6 +60,7 @@
fibers-delay
fibers-force
fibers-promise-reset
fibers-batch-for-each
fibers-for-each
@ -797,6 +798,10 @@ If already in the worker thread, call PROC immediately."
(raise-exception res)
(apply values res))))))
(define (fibers-promise-reset fp)
(atomic-box-set! (fibers-promise-values-box fp)
#f))
(define (fibers-batch-for-each proc batch-size . lists)
;; Like split-at, but don't care about the order of the resulting lists, and
;; don't error if the list is shorter than i elements