Closed carlocorradini closed 2 months ago
Did you have a specific use case in mind for an unbounded channel? My assumption when writing this was that you'd pretty much always want a bit of back-pressure if the client was struggling to keep up with the volume of messages coming through.
With an unbounded channel it seems like there's a risk of bugs (or just unexpected behaviour) in either the client or the server causing the channel to eat up all the memory available to it.
I've seen that the channel is always bounded (default to 5). What do you think if we also support unbounded channel (
Option<usize>
). Of course we should rethink on how to wrap the Sender and Receiver but I think this should be a nice feature.