core.async count in a channel

2014-01-16 Thread Paul Viola
Still finding my way around Clojure... sorry if this is trivial. I am using core.async to implement a queue for a collection of workers that pull jobs and complete them (there may be multiple producers as well). All looks great so far. Except when it comes time to close down the pipe (and dr

Re: core.async count in a channel

2014-01-18 Thread Paul Viola
@Meikel, I like your solution. Its key advantage is that you have enable arbitrary functionality in the "monitoring" of a channel. Since I am new to Clojure, and I bet others are too, I was subconsciously thinking about creating a new kind of channel (monitored channel). This solution does s

Re: core.async count in a channel

2014-01-21 Thread Paul Viola
I think this is all well and good for a particular use of channel. So perhaps I am misusing channels?? To repeat: in one case I have workers pulling from a channel of *real work*. For various reasons this channel might get filled rather deeply. In this case I would want to add additional workers