Closed nickd-airo closed 10 months ago
The current one is the correct behavior. Your change makes the executor immediately re-poll the future, which is not the intended behavior of this macro. See also docs.
Similarly, when using this macro, it must be ensured that
wake
is called somewhere when further progress can be made.
So I'm going to close this, but thanks anyway for the PR.
Sorry about that, I didn't read the documentation properly. Thanks for clarifying!
PendingOnce should wake() before returning Pending, otherwise executors may not poll() again.
Without this change, the following code blocks forever: