-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
stream: add StreamExt::chunks_timeout #4695
Conversation
The above avoids calling |
You will need to merge master to fix the CI failures. |
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've asked for some tests below for cases I believe your code currently implements incorrectly. Would you be able to fix them and add the tests? (Or if your code is already correct, just add the test.)
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.
The implementation looks good!
You still need to merge in master to fix the CI failures. See this page for more info. |
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 went though the PR again and found some more comments.
Co-authored-by: Alice Ryhl <aliceryhl@google.com>
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.
This looks good to me!
@Darksonn Could you please release a new version of tokio-stream that includes this feature? Thanks! |
Motivation
Closes #4694. Name is still up for suggestions!
Solution
This is essentially just adds a tokio timer on the futures_util Chunks.
Takes influence from https://github.com/mre/futures-batch which moved off the tokio timer API because it needed sub millisecond precision, however i don't think that's necessary here?