Fork me on GitHub
#core-async
<
2020-08-22
>
jjttjj14:08:01

Is there a reason why a mult waits for all taps to take a message rather than just put! ing the value on each tap and having the receiver be responsible for keeping up? I think I’m missing something philosophically about this

jjttjj14:08:23

Because ultimately every consumer must keep up with the producer anyway, but why would one prefer that a single lagging consumer would hold up every other one, rather than just having that single consumer have problems?

Jan K23:08:47

@jjttjj You can avoid holding up other consumers if you tap into a channel with an unblocking buffer. The channel/buffer decides what happens if the consumer can't keep up. Just put!ing values into a full blocking buffer would eventually make the mult blow up, rather than the slow consumer.

jjttjj15:08:29

Makes sense, thanks! I didn't really think about how too many put! s would cause pending put errors on the producer side anyway