Art*_*ldt 13 clojure core.async
所有经常当我从repl使用core.async时,go块会离开我,因为我松开了用于停止它的通道,因为我重新加载了一个命名空间.例如,如果我从repl运行它:
(go (when (not= c (second (async/alts! [c (async/timeout 1000)])))
(println "hello")))
Run Code Online (Sandbox Code Playgroud)
然后我重新加载命名空间,c丢失了.现在我已经"打招呼"了我的REPL垃圾邮件,直到时间结束.如果我可以关闭所有通道或杀死所有去块,它将节省我重新启动我的REPL.