Borrowing
use tokio::sync::oneshot;
async fn main() {
let (tx1, rx1) = oneshot::channel();
let (tx2, rx2) = oneshot::channel();
tokio::spawn(async move {
// Send values on `tx1` and `tx2`.
});
tokio::select! {
_ = rx1 => {
}
_ = rx2 => {
out.push_str("rx2 completed");
}
}