When I use alts!, it seems that both the put and :default action run every
time. I've included the code sample below:
(let [inner-chan (async/chan (async/buffer 1000))
mult (async/mult inner-chan)
(async/thread
(while true
(let [e (.take linked-blocking-queue)]
(async/alts!
[[inner-chan e]] (println "did the put")
:default (println "failed to put")
:priority true)))))
Elsewhere in the code, I tap the mult before I start putting elements onto
the linked-blocking-queue. For every element I put onto the LBQ, I see both
messages: "did the put" and "failed to put". What is going on here?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.