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

io: delegate poll_write_vectored to inner #5914

Merged
merged 3 commits into from Aug 10, 2023
Merged

io: delegate poll_write_vectored to inner #5914

merged 3 commits into from Aug 10, 2023

Conversation

M0dEx
Copy link
Contributor

@M0dEx M0dEx commented Aug 5, 2023

Motivation

The current implementation of AsyncWrite for WriteHalf<T> does not delegate its implementation of poll_write_vectored and is_write_vectored to the underlying struct. Instead, the default implementation is called, leading to unexpected behaviour.

Solution

This PR delegates the implementation poll_write_vectored and is_write_vectored to the underlying struct, fixing the issue.
It also adds a test to verify the delegation works as intended.

Fixes #5913.

TODO

  • delegate implementation of poll_write_vectored
  • delegate implementation of is_write_vectored (any tips on how to achieve this with the current method signature would be appreciated)

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-io Module: tokio/io labels Aug 9, 2023
tokio/src/io/split.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

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 M-io Module: tokio/io
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WriteHalf<T> does not delegate poll_write_vectored and is_write_vectored to its inner struct.
2 participants