Future trait design

⚓ Rust    📅 2025-10-26    👤 surdeus    👁️ 4      

surdeus

Info

This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Future trait design

The documentation for Context says that

Currently, Context only serves to provide access to a &Waker which can be used to wake the current task.

Is Context ever going to provide more?

Relatedly, in typical implementations of select, when the future is polled, it must internally poll every future it manages because the wakeup has no additional information about which future woke it up. Why doesn't poll take an extra argument (or Context contain something) to remedy this? Did the Future trait work like this at some point, allowing coroutines that could be resumed with a value?

1 post - 1 participant

Read full topic

🏷️ Rust_feed