You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The future returned by recv does not hold any future-local state, so it should be "cancellation-safe". That said I'd caution against using select!, and would recommend using combinators from futures-concurrency if possible.
To be honest, we (the Rust Async WG) should probably formalize the notion of "cancellation-safety" and bring it into the type system so this question can be answered from the function signature. But at the same time also work to replace select! as a primitive.
I have some code that looks this:
Is this safe? Thank you!
The text was updated successfully, but these errors were encountered: