blog.yoshuawuyts.com · 3d · discuss
IntroductionIn async Rust the Future::poll method is called to progress the state of the future, which reports its progress via the Poll enum. This enum contains two variants: Poll::Pending: means that the future is not yet ready to produce a value, and poll will need to be invoked again later. Poll::Ready(T): means the future is ready to yield some value T. Futures are called that because they will eventually resolve to a value, in the future. But that’s value singular, not values plural. The stdlib documentation does not clearly make this guarantee (though it should), and the ecosystem doesn’t always...