I need to send and receive multiple values between 2 tasks. I am currently using tokio oneshot channel because I am only dealing with 2 tasks. But I can't seem to re-use the tx probably due to its one message limit. How is this situation handled usually?
The tokio::sync::mpsc
channel should be used in this situation.
I suspect you're worried by the fact that it supports multiple senders, but its perfectly fine to use it when you only have one sender.