Advertisement
Guest User

Untitled

a guest
Aug 18th, 2014
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (let [ data-ch (chan)
  2.        key->endpoint {:config "http://localhost:8529/_db/_system/dev/shopio/config"
  3.                       :products "http://localhost:8529/_db/_system/dev/shopio/products"
  4.                       :photos "http://localhost:8529/_db/_system/dev/shopio/photos"}]
  5.      (go
  6.        (doseq [[k endpoint] key->endpoint]
  7.          (println "sending to channel...")
  8.          (put! data-ch endpoint)))
  9.      (go
  10.        (while true
  11.          (let [ep  (<! data-ch)]
  12.            (println "recieved:")
  13.            (println ep)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement