4 ms·
To write custom futures? Yes, you need to understand Pin and some advanced stuff. To use? Eh - I just turn on async_std with the Tokio flag and write go-like c
by jkelleyrtp 5y ago
To write custom futures? Yes, you need to understand Pin and some advanced stuff.
To use? Eh - I just turn on async_std with the Tokio flag and write go-like code with async tasks. No issues thus far.
- zinclozenge 5y agoWhat'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.