rust-lang / futures-rs

Zero-cost asynchronous programming in Rust
https://rust-lang.github.io/futures-rs/
Apache License 2.0
5.31k stars 609 forks source link

Implement the `UnwindSafe`/`RefUnwindSafe` traits on channels #2772

Open tomaka opened 10 months ago

tomaka commented 10 months ago

To my surprise, this trait isn't implemented on channels, even though channels are kind of a critical component to unwind safety.

See the code comment for an explanation of the reasoning.

I'm not 100% confident in what I'm doing, so feel free to summon unwind-safety experts, if there is any.

taiki-e commented 10 months ago

Thanks for the PR. I think we should make AtomicWaker UnwindSafe (#2211) first. (like tokio did)