Hi,

Channels are many-to-many in the sense that many processes can "put" values 
on the same channel, and many processes can be waiting to "take" a value. 
They are one-to-one in the sense that each "put" value will be delivered to 
exactly one "taker".

What you're describing sounds like a typical Observer pattern, which 
implies some state to keep track of "subscribers." You could implement 
something like this with channels using mult/tap or pub/sub, but it's not 
expressed directly in the core.async APIs.

Depending on the use case, doing it with channels may or may not be easier 
than implementing an Observer-style pattern directly. But having tried to 
implement an Observer once or twice, I've learned it's hard to get all the 
edge cases right, so now I find channels easier to understand.

–S

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to