Fork me on GitHub

Hi, I have a core.async question I hope someone could help me with. I have items added to channel in batches and I want to drain the channel at a set point in time. So empty the channel once in a while and then back off for sometime.


I found the mute functionality in the mix function, I think that will help me. But how do I know the channel is empty and stop reading from it (until I know I want have another go again)


@ghaskins: Silly question… but what is the port? is that the same as a channel?


@thomas: yes, that seems to be the nomenclature for chan in the doc


aah ok, hadn’t noticed that. I thought they were called chan(nel) though out.


Thank you very much indeed for the hint. Much appreciated!!!

Alex Miller (Clojure team)19:06:57

A port is a channel end (usually read or write specific)

Alex Miller (Clojure team)19:06:53

So it is a more general abstraction - there are things in async that create ports that aren't channels