I'm legit so stoked about this! Conceptually this now feels really close to how JS Promises work, but with Rust's error handling story included (no unhandled rejections possible, first class abort through panic!()), and first-class cancellation (Through Drop). Very good!
-
-
Show this thread
-
Oh oh, another difference: Futures are polled immediately*, allowing them to start work right away and wait for a callback. In practice this means that unlike Promises, sync Futures don't suffer from nextTick delays. * This depends on the scheduler, but it's generally true.
Show this thread
End of conversation
New conversation -
-
-
I'm a bit confused that there seems to be some opposition to the RFC, but I'm not deep in enough to understand quickly.
-
This patch on Waker, or the Following stabilization RFC?
- 3 more replies
New conversation -
-
-
Looking at the final poll signature, it just feels so right and self-explanatory: fn poll(self: Pin<&mut Self>, waker: &Waker) -> Poll<Self::Output> We came a loooong way since fn poll(&mut self) -> Poll<Self::Item, Self::Error>
-
For people reading along: the old API also had Waker but accessed as global, had a task-local context as a global too, and could only ever return Result. There were important things missing in the function signature!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.