It wouldn’t be too hard to tell it apart. A yield is defined as the task waking itself vs something else waking it. The yield methods already do this.
Again, FuturesUnordered cannot know the difference between a task wanting to yield and a task that wants to be polled immediately. The waker does not get this information, either. It cannot distinguish.
heftig|4 years ago
carllerche|4 years ago
Yield = wake the `waker_ref`. Avoiding the yield would be clone().wake().
That said, "poll immediately" isn't actually a thing nor was it ever a thing except in incorrect implementations.