Currently sable uses tokio's mpsc UnboundedSender and UnboundedReceiver to queue messages to clients. These cannot block, but they can use an arbitrary amount of memory which isn't really desired. Ideally we would use a bounded mpsc Sender and Receiver that does not allocate.
For example, when sending an RPL_LIST using this framework, unless we yield then the entirety of the list body is placed into the sender buffer instead of being sent directly.
Currently sable uses tokio's mpsc
UnboundedSenderandUnboundedReceiverto queue messages to clients. These cannot block, but they can use an arbitrary amount of memory which isn't really desired. Ideally we would use a bounded mpscSenderandReceiverthat does not allocate.For example, when sending an
RPL_LISTusing this framework, unless we yield then the entirety of the list body is placed into the sender buffer instead of being sent directly.