From 67f40c6246d3f83a64bcc5ffbe884752c003ded9 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Tue, 1 Aug 2017 11:21:44 -0500 Subject: [PATCH] Remove spawn-inbox. * 8sync/inbox.scm (spawn-inbox): Removed. --- 8sync/inbox.scm | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/8sync/inbox.scm b/8sync/inbox.scm index ad3bdfb..bf1eabc 100644 --- a/8sync/inbox.scm +++ b/8sync/inbox.scm @@ -25,26 +25,8 @@ #:use-module (ice-9 q) #:use-module (srfi srfi-9) #:use-module (ice-9 atomic) - #:export (spawn-inbox - delivery-agent)) + #:export (delivery-agent)) -(define* (spawn-inbox) - "Spawn an inbox fiber which manages a a buffered queue. - -Returns three values to its continuation: a INBOX-ENQ channel to send -messages to, an INBOX-DEQ channel which is what the actor doing the -reading should read from, and a STOP? atomic box which can be set to #t -to stop delivery." - (let ((inbox-enq (make-channel)) - (inbox-deq (make-channel)) - (stop? (make-atomic-box #f))) - (spawn-fiber (lambda () - ;; From the perspective of the delivery-agent, - ;; deliver-to - (delivery-agent inbox-enq inbox-deq stop?))) - (values inbox-enq inbox-deq stop?))) - -;; @@: Do we want to add a stop condition? (define (delivery-agent inbox-enq inbox-deq stop?) "This starts up a loop doing delivery receiving from INBOX-ENQ and delivering to INBOX-DEQ, actually managing an (ice-9 q) object QUEUE. -- 2.31.1