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

Consider a specialized split fn for TcpStream #174

Closed
carllerche opened this issue Mar 3, 2018 · 4 comments · Fixed by #1217
Closed

Consider a specialized split fn for TcpStream #174

carllerche opened this issue Mar 3, 2018 · 4 comments · Fixed by #1217
Milestone

Comments

@carllerche
Copy link
Member

The type can safely support a read and a write task without coordination.

@vojtechkral
Copy link
Contributor

vojtechkral commented Jun 6, 2019

@carllerche I would like to have a look at this as part of my work. I've posted an (ugly) workaround in #1108. Also related is #852 - the split could easily handle connection shutdown, which could make a lot of TcpStream use cases simpler.

Do you have preferences as to how this should be structured and/or other design constraints before I start writing a PR?
Is this also applicable to UnixStream and UdpSocket?

@carllerche
Copy link
Member Author

Yes, probably.

Incidentally, I think not calling TcpShutdown in Sink shutdown was probably a mistake.

@carllerche
Copy link
Member Author

I think this may require some changes to PollEvented. I have not thought that Koch about it yet but now is a good time to explore as we can issue breaking changes.

@vojtechkral
Copy link
Contributor

vojtechkral commented Jun 7, 2019

Also related: #824 & #774 . Seems like the same underlying problem keeps popping up :-) I thought this might be an opportunity for me to familiarize with Tokio & mio a bit, perhaps with some mentoring if that's fine? (Or is the change too fundamental for that?)

I'm only reading the implementation so far. Seems like PollEvented & Registration is sort of ready for the indepentend reading & writing screnario, but this might be at odds with ownership, since I/O needs mut access...

@carllerche carllerche added this to the v0.2 milestone Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants