bhauman / bhauman.github.com

My blog
http://rigsomelight.com
12 stars 9 forks source link

A question about queue behavior in todos_async/ex2.cljs #2

Open tangrammer opened 10 years ago

tangrammer commented 10 years ago

Hi Bruce,

If the function merge try inside a loop to remove/take all the values of all the queues/channels passed to it to fill in with these values the merged channel, then it has no much sense try try to access again to one of these channels while the merge running is already running the commented loop

Also I have seen that in ex4.cljs you only use the merged-channel to swith the state mode so maybe it is an improved use of the channels ...

Thanks in advance for sharing and your welcomed clojure/async posts Juan

bhauman commented 10 years ago

Your right about that. Two loops pulling from the same channel is a bad idea. I have to fix the post.

On Oct 17, 2013, at 7:35 PM, juanantonioruz notifications@github.com wrote:

Hi Bruce,

If the function merge try inside a loop to remove/take all the values of all the queues/channels passed to it to fill in with these values the merged channel, then it has no much sense try try to access again to one of these channels while the merge running is already running the commented loop

Also I have seen that in ex4.cljs you only use the merged-channel to swith the state mode so maybe it is an improved use of the channels ...

Thanks in advance for sharing and your welcomed clojure/async posts Juan

— Reply to this email directly or view it on GitHub.