Skip to content
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

Idea: Take advantage of new size_hint method in streams #1623

Closed
craftytrickster opened this issue Oct 2, 2019 · 1 comment
Closed

Idea: Take advantage of new size_hint method in streams #1623

craftytrickster opened this issue Oct 2, 2019 · 1 comment
Labels
A-tokio Area: The main tokio crate C-enhancement Category: A PR with an enhancement or bugfix. M-stream Module: tokio/stream

Comments

@craftytrickster
Copy link
Contributor

I noticed that the futures crate recently accepted the following change rust-lang/futures-rs#1853, which adds a size_hint method to the Stream trait. Perhaps this information can be used to optimize certain places that handle streams in tokio.

Note - I am not familiar with how tokio is implemented, so I am not sure if this is a valid suggestion or not.

@carllerche carllerche added the C-enhancement Category: A PR with an enhancement or bugfix. label Oct 2, 2019
@craftytrickster
Copy link
Contributor Author

I see size hint has been added https://github.com/tokio-rs/tokio/pull/2430/files

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-stream Module: tokio/stream labels May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-enhancement Category: A PR with an enhancement or bugfix. M-stream Module: tokio/stream
Projects
None yet
Development

No branches or pull requests

3 participants