-
Hi, I'm new to rust and tokio. in std::fs::File, write to a read only File, will panic. like code below.
out put error:
but in tokio::fs::File, write to a read only file, return success, and file not change.
output :
my tokio version: why tokio not panic? or I do something wrong? |
Beta Was this translation helpful? Give feedback.
Answered by
Darksonn
Jan 11, 2023
Replies: 1 comment 1 reply
-
For technical reasons, errors are not reported until the following flush or write. If you try to flush, you should get the error. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
alexniver
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For technical reasons, errors are not reported until the following flush or write. If you try to flush, you should get the error.