Topic
Everything filed under Async, newest first.
RSS · JSON · All topics
The Future Trait Has A Missing State
Yoshua Wuyts argues that Rust's Future trait lacks a way to report that a future has already completed: polling after Ready may panic or misbehave, forcing bookkeeping wrappers like MaybeDone and adding code size. He sketches fixing Poll and CoroutineState with a 'done' state, explores even more states, and urges not repeating the mistake in the Coroutine trait and gen keyword.
8 min · 1,739 words