Use put! On Friday, July 31, 2015 at 8:21:18 AM UTC+2, Raymond Huang wrote: > > I'd like to use `add-watch` on an atom which writes the data to a > core.async channel. So far, I've come up with this, but it seems bad > because I create a new go-routine everytime something happens. > > (add-watch ref watch-id #(go (a/>! user-changes %&))) > > This seems like a bad idea to me because I am creating a new go routine > everytime. Furthermore, I'd like this to be portable between Clojure & > Clojurescript. > > I can't think of how I'd be able to solve this. >
-- 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.