-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[draft] io: consume budget in Registration::readiness #4784
Conversation
This seems like it might make some operations consume budget twice. |
Yes, I don't think this is actually where I want to put this. |
I'll finish this up in the morning, I'm a bit too sleepy to figure out where best to put it right now. |
@Darksonn I'm not actually sure where something we have could consume budget twice for the same work. Also, is there any general guidelines for where should consume budget (which operations is it worthwhile for) or not? I was looking through where all we do budgeting vs don't and it doesn't seem super consistent to me. |
The CI failures I think have to do with tests assuming that something will always immediately yield |
Generally, we consume one budget whenever a poll function returns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking closer at this, I believe the following should be enough to finish this PR.
Pin::new(&mut fut).poll(cx).map(Ok) | ||
let x = Pin::new(&mut fut).poll(cx).map(Ok); | ||
|
||
coop.made_progress(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coop.made_progress(); | |
if x.is_ready() { | |
coop.made_progress(); | |
} |
@Noah-Kennedy do you have time to finish this up? If not, would you like me to take it over? |
I should be able to finish this up on Saturday. If you can get to this before then, go for it! |
Since this is a stale draft, I will close it for now. |
Fixes #4782.