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
Hi team.
When I tried using the tokio-uringTcpStream.read method, I found that polling it never yields ready data.
Here is a code example where I attempt to implement the hyper::rt::Read trait using the read method provided by TcpStream
The hyper::rt::Read requires me to return a Poll<Result>. So I can not directly use self.inner.read(read_slice.to_vec()).await
So my idea was to use self.inner.read(read_slice.to_vec()) to get a future, and then manually use poll to get the result.
However, I found that in the example below, using read_future.poll can never yields a result.
Can someone point out where I went wrong? I checked the tcp_eco example and found that directly using TcpStream.read().await can get a result. I don't understand what the difference is here.🤔
The text was updated successfully, but these errors were encountered:
Hi team.
When I tried using the
tokio-uring
TcpStream.read
method, I found that polling it never yields ready data.Here is a code example where I attempt to implement the
hyper::rt::Read
trait using theread
method provided byTcpStream
The hyper::rt::Read requires me to return a
Poll<Result>
. So I can not directly useself.inner.read(read_slice.to_vec()).await
So my idea was to use
self.inner.read(read_slice.to_vec())
to get a future, and then manually use poll to get the result.However, I found that in the example below, using
read_future.poll
can never yields a result.Can someone point out where I went wrong? I checked the tcp_eco example and found that directly using
TcpStream.read().await
can get a result. I don't understand what the difference is here.🤔The text was updated successfully, but these errors were encountered: