4 ms·
What's the deal with cancellations? If you're coming from Go, the context package makes it convenient to do.
by zinclozenge 5y ago
What's the deal with cancellations? If you're coming from Go, the context package makes it convenient to do.
- deleted 5y ago[deleted]
- ibraheemdev 5y agoFunny you mentioned the context package, as it was pretty hacky way to work around the cancellation problem. There are some pain points with cancellation in Rust. Dropping a future cancels it, but that requires ownership over the future, and may cause unexpected behavior due to the nature of futures state machines. This, along with many other issues, is being discussed by the async working group: https://github.com/rust-lang/wg-async-foundations/issues/65 https://github.com/rust-lang/wg-async-foundations/issues/65. If you have specific suggestions, or a problem that you faced, please open an issue! It is really appreciated - async rust's problems cannot be solved without community feedback and engagement.