core-async

2020-08-22T14:23:01.000700Z

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

2020-08-22T14:30:23.002400Z

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 K 2020-08-22T23:08:47.012400Z

@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.

2020-08-23T15:56:29.012800Z

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