Commits

Moritz Heidkamp committed 84b66f7

when the same receiver is passed multple times to channel-receive, actually run it multiple times

Comments (0)

Files changed (2)

               message))
         (if (queue-empty? queue)
             (begin
-              (set-insert-list! otrec args)
+              (for-each
+               (lambda (receiver)
+                 (set-insert! otrec (lambda (m) (receiver m))))
+               args)
               (mutex-unlock! mutex)
               #f)
             (let ((message (queue-first queue)))
   (on-channel-receive c results-3)
   (channel-enqueue c 5)
   (test (results-1) '(1 2 3 4 5))
-  (test (results-2) '(4))
+  (test (results-2) '(4 4))
   (test (results-3) '(5))
   (channel-remove-receiver c results-1)
   (channel-enqueue c 6)