Add more documentation

This commit is contained in:
Christopher Baines 2026-03-18 08:44:26 +00:00
parent 5b84273cbf
commit d3d4964210
4 changed files with 134 additions and 4 deletions

View file

@ -25,6 +25,12 @@
#:export (spawn-queueing-fiber))
(define (spawn-queueing-fiber dest-channel)
"Spawn a fiber that serialises items onto DEST-CHANNEL in FIFO order.
Returns a new input channel.
Multiple producers can put items on the returned channel concurrently.
The fiber buffers them locally and forwards them to DEST-CHANNEL one at
a time, preserving arrival order."
(define queue (make-q))
(let ((queue-channel (make-channel)))