Is cancellation of futures yielded by methods of this library (e.g. Websocket::receive) safe?
Imagine a scenario like this
async fn foo() {
// ...
tokio::select!{
_ = done_soon() => {
do_stuff()
},
_ = websocket.receive() => {
// ...
}
}
}
If done_soon finishes while Websocket::receive processes an incoming Frame, will the frame be lost?
Is cancellation of futures yielded by methods of this library (e.g.
Websocket::receive) safe?Imagine a scenario like this
If
done_soonfinishes whileWebsocket::receiveprocesses an incoming Frame, will the frame be lost?