Fork me on GitHub
#core-async
<
2016-06-20
>
thomas10:06:11

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.

thomas10:06:28

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)

thomas13:06:07

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

ghaskins13:06:40

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

thomas13:06:13

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

thomas13:06:56

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