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

Vectored IO (like std and futures-preview) #1271

Closed
blckngm opened this issue Jul 5, 2019 · 0 comments
Closed

Vectored IO (like std and futures-preview) #1271

blckngm opened this issue Jul 5, 2019 · 0 comments

Comments

@blckngm
Copy link
Contributor

blckngm commented Jul 5, 2019

I was reading rust 1.36 announcement and noticed that vectored IO is now stablized in std:

Right now tokio seem to use vectored IO when implementing poll_read_buf/poll_write_buf, but there are no straightforward public API for vectored IO.

I think tokio should add direct support for vectored IO, just like futures-io-preview and futures-util-preview:

(Using a similar API with futures-io also eases future transition to use futures-io directly or providing a compatibility layer with futures-io without performance penalty.)

I don't know whether poll_read_buf and poll_write_buf should be kept in AsyncRead/AsyncWrite. Are there more possible optimizations for them besides using vectored IO?

Right now bytes and mio use iovec::IoVec, but they are transitioning to IoSlice/IoSliceMut in the next version: #263, #957. Meanwhile, we can transmute stuff before these dependencies are updated, because IoVec and IoSlice/IoSliceMut are ABI compatible (because they are both ABI compatible with WSABUF or libc::iovec).

@carllerche carllerche added this to the v0.2 milestone Jul 15, 2019
@carllerche carllerche removed this from the v0.2 milestone Nov 22, 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

No branches or pull requests

3 participants