-
-
Save devn/72d8d9ad414ef448ced3 to your computer and use it in GitHub Desktop.
This file contains 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
;; Add items to a pipeline | |
(go (doseq [row rows] | |
(>!! in row))) | |
;; When we've fully exhausted the out channel, exit. | |
(let [stop (chan)] | |
(go (loop [] | |
(let [[v c] ($/alts! [out stop] | |
:default :continue)] | |
(if (= c stop) | |
(do (println "STOP!") | |
(System/exit 0)) | |
(recur)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment