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

Provide a way to force the queue writev strategy #2282

Closed
seanmonstar opened this issue Sep 17, 2020 · 0 comments · Fixed by #2285 or differs/Legends#5
Closed

Provide a way to force the queue writev strategy #2282

seanmonstar opened this issue Sep 17, 2020 · 0 comments · Fixed by #2285 or differs/Legends#5
Labels
A-client Area: client. A-http1 Area: HTTP/1 specific. A-server Area: server. E-easy Effort: easy. A task that would be a great starting point for a new contributor.

Comments

@seanmonstar
Copy link
Member

There is http1_writev(bool) currently to allow someone to force alwaysing using the "flatten" strategy of writing. However, when calling http1_writev(true), that just keeps the default, which is "auto". There should be a way for users to specify "always use the queue strategy, don't use auto".

The most logical way would be to keep "auto" as the default, calling http1_writev(false) would force "flatten", and calling http1_writev(true) would force "queue". This can be done by changing the builders to hold http1_writev: Option<bool> internally.

@seanmonstar seanmonstar added A-server Area: server. A-client Area: client. E-easy Effort: easy. A task that would be a great starting point for a new contributor. A-http1 Area: HTTP/1 specific. labels Sep 17, 2020
Snarpix pushed a commit to Snarpix/hyper that referenced this issue Sep 18, 2020
seanmonstar pushed a commit that referenced this issue Sep 18, 2020
…sage

Previously, calling `http1_writev(true)` would just keep the default behavior, which was to auto detect if writev was optimal. Now, the auto-detection is still default, but explicitly calling `http1_writev(true)` will skip the auto-detection, and always use writev queue strategy.

Closes #2282
BenxiangGe pushed a commit to BenxiangGe/hyper that referenced this issue Jul 26, 2021
…sage

Previously, calling `http1_writev(true)` would just keep the default behavior, which was to auto detect if writev was optimal. Now, the auto-detection is still default, but explicitly calling `http1_writev(true)` will skip the auto-detection, and always use writev queue strategy.

Closes hyperium#2282
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-client Area: client. A-http1 Area: HTTP/1 specific. A-server Area: server. E-easy Effort: easy. A task that would be a great starting point for a new contributor.
Projects
None yet
1 participant