Created
May 6, 2016 18:56
-
-
Save hlship/3350f2f5007c084799a9f55053967e6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn customers [db] | |
(let [ch (chan 100) | |
db-ch (exec-customer-query db :all)] | |
(go-loop [] | |
(when-let [customer (<! db-ch)] | |
(>! ch customer) | |
(recur))) | |
ch)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment