-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: allow overriding the instant returned from Timer #3965
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
Conversation
This avoids bad behavior like being stuck on a busy loop when tokio paused clock is used. Requires hyperium/hyper#3965
This avoids bad behavior like being stuck on a busy loop when tokio paused clock is used. Requires hyperium/hyper#3965
|
cc @seanmonstar |
|
Any update on this? |
src/rt/timer.rs
Outdated
| /// This function is currently unstable to implement - its | ||
| /// definition might change in a future version of Hyper | ||
| /// | ||
| /// FIXME: do we want to mention this function in the module doc comment? |
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.
Should this really be considered unstable? Probably both of these lines can be removed, and just include that "The default implementation calls Instant::now()."
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.
Changed
|
If you are fine with it being insta-stable we can have that.
|
4f62f52 to
8df55df
Compare
|
Added comment that makes it stable |
seanmonstar
left a comment
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.
Thanks!
Fully backwards-compatible
See #3950 and hyperium/hyper-util#238