-
Notifications
You must be signed in to change notification settings - Fork 27
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
question: What is the proper way how to wait for a BufReader::read_line
to finish?
#47
Comments
Also might be related as I also get on one test
|
And ongoing question, if you don't mind.
Where inner is a Because it just don't work, the buffer is never read 😞 When I use |
Testing it in a different project and |
I can state that it sometimes fails and sometimes not. p.read_line(&mut msg).await.unwrap(); // works
***
p.read_line(&mut msg).await.unwrap(); // panic on assert_debug |
So moving from
|
Running it in |
Hey there,
so I was trying to
read_line
from aBufReader
but it producesWouldBlock
if there's no data available.What is the proper way to force the thing to wait until the data is actually there?
I use
BufReader
on aasync_fs::File
By the way is it normal? https://docs.rs/futures-io/0.3.15/futures_io/trait.AsyncBufRead.html#tymethod.poll_fill_buf
The text was updated successfully, but these errors were encountered: