-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Panic when using AsyncReadExt::copy_into with a body and a async_std::fs::File #72
Comments
Thank you for your very comprehensive bug report! This does look like a problem. I will investigate this and work on a fix as soon as I can. |
Just taking a wild guess as to what the problem is, what happens if you call |
I just tried it, and unfortunately, it produces the same result. I feel like it might be a bug in |
Ultimately something is calling My guess is that |
This fix has been published in version 0.7.2! |
Thanks, I've just checked it, and it indeed works! Thanks for the fast reply and fix! |
The following snippet panics at the
copy_into
part, from thefutures::io::AsyncReadExt
:backtrace:
It also panics if I
copy_into
the data to aasync_std::io::Stdout
:But if I pipe the data inside a
async_std::io::sink
, it doesn't panic:It doens't panic either if I pipe inside a
async_std::net::TcpStream
:async_std::fs::File
andasync_std::io::Stdout
have one thing in common: they use blocking io in a threadpool. But if Icopy_into
from aFile
to another, there is no panic:I've put up a gist with all the test cases, a
Cargo.lock
/Cargo.toml
, and even arust-toolchain
file, to help with reproducing the issue: https://gist.github.com/justinrlle/ac3d9a44c50bc01a5f7f373cea93a1f0The text was updated successfully, but these errors were encountered: