Good read about cancellations in Async Rust https://sunshowers.io/posts/cancelling-async-rust/
This blogpost covers a lot of the problems in this space very well. I like how it emphasizes definitions and semantics, shows examples of bugs they came across to, and list some practical recommendations.
The "double-edge sword" of cancellation in Rust is spot on: on one hand, it's cool how "easy" and simple it is to cancel future in Rust -- you *drop* it. Especially given how non-trivial it can be in synchronous environments.
However, this also means it's far too easy to *silently* drop a future. This is scary on its own, and combined with the fact that cancellation of parent futures propagates down to child futures (because of the single ownership model) makes it much more concerning.
This post also links another (much older, Feb 2024) blogpost that covers this space well, elaborating on async clean-up problems and mentions linear types as a solution https://without.boats/blog/asynchronous-clean-up/
