clojure core.async 频道不再使用时是否应该关闭?

Should clojure core.async channels be closed when not used anymore?

据我所知,

Close method (at least in java world) is something that you as a good citizen have to call when you are done using related resource. Somehow I automatically started to apply the same for the close! function from core.async library. These channels 对任何 IO 都不严格,因此我不确定是否有必要调用 close!。是否可以在不关闭垃圾收集频道的情况下离开频道(本地频道)?

将它们留给垃圾收集器很好除非关闭它们在您的程序中有意义。关闭它们作为其他组件的信号是很常见的,它是时候关闭它们自己了。其他通道旨在永远使用,永远不会被关闭或被垃圾收集。在其他情况下,通道用于将一个值传递给消费者,然后生产者和消费者都完成,通道被 GC。在后一种情况下,无需关闭它们。