#Request-Response style channel type
7 messages · Page 1 of 1 (latest)
Could you use something like https://docs.rs/crossbeam/0.8.1/crossbeam/channel/index.html ?
Multi-producer multi-consumer channels for message passing.
there's a general trick for request-response: put the sender of a tokio::sync::oneshot channel inside each of your request messages, which can then convey the response
yeah i was considering that but wasnt sure if there was a better solution
i only need 1-1 as i only need to communicate between 1 task and 1 manager, though this style of channel would work well
i think im gonna go with the crossbeam channel and see how it works out
you don't want to use crossbeam channels from async tasks because they have blocking receive, not .await receive