Cancel correctness issues (hachyderm.io)
from snaggen@programming.dev to rust@programming.dev on 19 Oct 2023 06:01
https://programming.dev/post/4587663

hachyderm.io/@rain wrote :

#RustLang cancel correctness issues commonly occur with tokio::select, but are by no means restricted to them.

If you’re flushing two buffered writers concurrently, you shouldn’t use try_join because if one of them fails, the other flush will be cancelled rather than driven to completion.

This is a kind of cancellation issue no one has really talked about but we’ve run into this at Oxide!

To address this we have a new macro called join_then_try:

docs.rs/…/macro.join_then_try.html#why-use-join_t…

#rust

threaded - newest