You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(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).
The text was updated successfully, but these errors were encountered:
I was reading rust 1.36 announcement and noticed that vectored IO is now stablized in std:
IoSlice
IoSliceMut
Read::read_vectored
Write::write_vectored
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
andfutures-util-preview
:poll_read_vectored
method toAsyncRead
,poll_write_vectored
method toAsyncWrite
,read_vectored
method toAsyncReadExt
,write_vectored
method toAsyncWriteExt
.(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
andpoll_write_buf
should be kept inAsyncRead
/AsyncWrite
. Are there more possible optimizations for them besides using vectored IO?Right now
bytes
andmio
useiovec::IoVec
, but they are transitioning toIoSlice
/IoSliceMut
in the next version: #263, #957. Meanwhile, we cantransmute
stuff before these dependencies are updated, becauseIoVec
andIoSlice
/IoSliceMut
are ABI compatible (because they are both ABI compatible withWSABUF
orlibc::iovec
).The text was updated successfully, but these errors were encountered: