Fork me on GitHub
#core-async
<
2016-12-06
>
upgradingdave19:12:28

hi all, I’m not sure how to google for this question - I understand why you might want to use a buffered channel in multithreaded java world. But in js, is there ever any reason to use a buffer bigger than 1?

upgradingdave19:12:58

I can’t quite wrap my brain around a buffered channels in cljs, does anyone know of good blog posts about this?

hiredman19:12:08

buffers are nothing to do with concurrency and everything to do with feedback

genRaiy19:12:24

regarding mult … I get odd behaviours if I create a mult inside a function and then use it in a go loop; if I def a mult, all goes well - is this a known pattern?

upgradingdave21:12:21

@hiredman, I get it now, thanks. Not sure what I was thinking before. Actually I was thinking along the lines of in single thread if both producer and consumer run on every tick of the loop, then why would I ever need buffers?! But yeah, senior moment or something, because now I realize there can be tons of ajax requests or something that you want to queue up. duh!