Replies: 1 comment 1 reply
-
|
We used to do that in the past, but we changed it in #5223. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
FuturesUnordereddetects whether the futures it is managing intend to yield by checking whether the waker has been notified when the poll result wasPending. If there are two instances of this,FuturesUnorderedwill itself yield.However, Tokio's
yield_nowutility doesn't follow this pattern, as it defers so the waker is only notified after the scheduler runs the I/O loop (from what I could tell). In this playground you can see how these two behaviors of yielding change the schedule order.It also seems that Tokio has a similar detection, so I was wondering if it makes sense to change Tokio's
yield_nowto immediately wake the waker?Beta Was this translation helpful? Give feedback.
All reactions