Skip to content

Instantly share code, notes, and snippets.

@tgvashworth
Created September 1, 2014 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tgvashworth/32ab6737141d989ea280 to your computer and use it in GitHub Desktop.
Save tgvashworth/32ab6737141d989ea280 to your computer and use it in GitHub Desktop.
take vs alts priority
(go
(let [v (<! c)]
(println "take got" v)))
(go
(let [[v c] (alts! [c c2])]
(println "alts got" v)))
(>!! c 1)
; => alts got 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment