Just as there is a Receiver::iter and a Receiver::try_iter, where a Receiver can receive multiple items at once, it would seem there should also be an interface where a Sender can send multiple items at once from a single sender.
Perhaps I'm mistaken, but an interface like this, might reduce the amount of time spent contending on any locks, or reduce the amount of times a buffer Vec needs to realloc.
Why am I requesting this? I am working with a previously existing interface, which takes a Sender as a parameter. I'd also guess that sending in parallel would introduce overhead, and sometimes I'd like to maintain the order of when each item was sent.
Just as there is a
Receiver::iter
and aReceiver::try_iter
, where a Receiver can receive multiple items at once, it would seem there should also be an interface where a Sender can send multiple items at once from a single sender.Maybe something which looks like:
Perhaps I'm mistaken, but an interface like this, might reduce the amount of time spent contending on any locks, or reduce the amount of times a buffer
Vec
needs to realloc.Why am I requesting this? I am working with a previously existing interface, which takes a Sender as a parameter. I'd also guess that sending in parallel would introduce overhead, and sometimes I'd like to maintain the order of when each item was sent.
Thanks!