-
Notifications
You must be signed in to change notification settings - Fork 116
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
feat: Add TokioTimer to rt::tokio module #73
Merged
Merged
Conversation
This file contains 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
seanmonstar
reviewed
Dec 8, 2023
Thanks for noticing and submitting this, I appreciate it a ton! ❤️ |
daxhuiberts
force-pushed
the
tokio-timer
branch
from
December 8, 2023 21:44
41abf7d
to
b82c457
Compare
Co-authored-by: Sean McArthur <sean@seanmonstar.com>
daxhuiberts
force-pushed
the
tokio-timer
branch
from
December 8, 2023 21:46
b2b1079
to
bee620b
Compare
seanmonstar
approved these changes
Dec 8, 2023
Hi, when will it be published? |
yukiiiteru
added a commit
to yukiiiteru/volo
that referenced
this pull request
Dec 19, 2023
The `TokioTimer` and `TokioSleep` from `timer.rs` are copied from `hyper-util`. Since these are very important, but the new version of `hyper-util` containing these has not been released yet, I copied it temporarily. `timer.rs` will be removed once the `hyper-util` 0.1.2 released, and `hyper_util::rt::TokioTimer` will be used directly. Refer: hyperium/hyper-util#73 Signed-off-by: Yu Li <wfly1998@sina.com>
yukiiiteru
added a commit
to yukiiiteru/volo
that referenced
this pull request
Dec 19, 2023
Both server and client of `hyper` need to set a timer, otherwise they will **panic** when timeout occurs. But `hyper` does not provide an implementation of the trait `Timer`, and even if `hyper-util` does provide one, updates are not released in new versions. To solve this problem, I copied `TokioTimer` and `TokioSleep` from the latest repository of `hyper-util` and put them into `time.rs`. `timer.rs` will be removed once the `hyper-util` 0.1.2 released, and `hyper_util::rt::TokioTimer` will be used directly. Refer: hyperium/hyper-util#73 Signed-off-by: Yu Li <wfly1998@sina.com>
yukiiiteru
added a commit
to cloudwego/volo
that referenced
this pull request
Dec 20, 2023
* chore(volo-http): bump volo-http * fix(volo-grpc): add `timer` for hyper client and server Both server and client of `hyper` need to set a timer, otherwise they will **panic** when timeout occurs. But `hyper` does not provide an implementation of the trait `Timer`, and even if `hyper-util` does provide one, updates are not released in new versions. To solve this problem, I copied `TokioTimer` and `TokioSleep` from the latest repository of `hyper-util` and put them into `time.rs`. `timer.rs` will be removed once the `hyper-util` 0.1.2 released, and `hyper_util::rt::TokioTimer` will be used directly. Refer: hyperium/hyper-util#73 --------- Signed-off-by: Yu Li <wfly1998@sina.com>
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.
In the latest master branch of
hyper
thehello
server example has been changed to include aTokioTimer
.This exists in
hyper
'ssupport
module, but does not yet exist inhyper-util
.This PR adds that functionality by copying over the implementation from
hyper
.Similar to
TokioExecutor
in this repo. It can only be created through thenew
constructor. This differs fromhyper
'ssupport
module, where bothTokioExecutor
andTokioTimer
are directly creatable as an empty struct.