[英]What's the best way to handle this sequence transformation in Clojure?
[英]What transformation is go macro doing to the user’s code?
go宏如何转换代码
(let [c1 (chan)
c2 (chan)]
(go (while true
(let [[v ch] (alts! [c1 c2])]
(println "Read" v "from" ch))))
(go (>! c1 "hi"))
(go (>! c2 "there")))
它是后面的状态机。 您可以在core.async 的状态机中阅读更多内容
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.