-
Notifications
You must be signed in to change notification settings - Fork 234
async: add DelayUs #344
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
async: add DelayUs #344
Conversation
r? @ryankurte (rust-highfive has picked a reviewer for you, use r? to override) |
How do we handle the changelog check for the async crate? No need to changelog anything until first release, I guess. |
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.
Seems fine to me, thanks!
Do you really need two different futures for the us
and ms
variants?
The changelog check does not seem to support more than one changelog file in a repository so I think we can just ignore it for e-h-a changes. It is not required for a bors merge, just slightly annoying for maintainers.
an impl may want to have a loop for the Also, for consistency I'd rather always do "1 method = 1 future associated type". This is what the future "async fn in traits" will desugar to. Also, users will almost never use the associated types, they'll always do |
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.
I see, thanks for the clarification.
Looks good to me!
bors r+
Add async DelayUs, mirroring the blocking one.
Unlike blocking,
delay_ms
has no default impl because it's not possible to have default impls in GAT-based async traits.