feat: allow overriding the instant returned from Timer#3965
Merged
seanmonstar merged 2 commits intohyperium:masterfrom Nov 10, 2025
Merged
feat: allow overriding the instant returned from Timer#3965seanmonstar merged 2 commits intohyperium:masterfrom
seanmonstar merged 2 commits intohyperium:masterfrom
Conversation
arielb1
pushed a commit
to arielb1/hyper-util
that referenced
this pull request
Oct 19, 2025
This avoids bad behavior like being stuck on a busy loop when tokio paused clock is used. Requires hyperium/hyper#3965
arielb1
pushed a commit
to arielb1/hyper-util
that referenced
this pull request
Oct 19, 2025
This avoids bad behavior like being stuck on a busy loop when tokio paused clock is used. Requires hyperium/hyper#3965
Contributor
Author
|
cc @seanmonstar |
Contributor
Author
|
Any update on this? |
seanmonstar
reviewed
Nov 7, 2025
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? |
Member
There was a problem hiding this comment.
Should this really be considered unstable? Probably both of these lines can be removed, and just include that "The default implementation calls Instant::now()."
Contributor
Author
|
If you are fine with it being insta-stable we can have that.
|
4f62f52 to
8df55df
Compare
Contributor
Author
|
Added comment that makes it stable |
arielb1
pushed a commit
to arielb1/hyper-util
that referenced
this pull request
Nov 11, 2025
This avoids bad behavior like being stuck on a busy loop when tokio paused clock is used. Requires hyper 1.8.0 for hyperium/hyper#3965
seanmonstar
pushed a commit
to hyperium/hyper-util
that referenced
this pull request
Nov 11, 2025
This avoids bad behavior like being stuck on a busy loop when tokio paused clock is used. Requires hyper 1.8.0 for hyperium/hyper#3965 Co-authored-by: Ariel Ben-Yehuda <arielby@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fully backwards-compatible
See #3950 and hyperium/hyper-util#238