Skip to content

Roadmap for File I/O #3012

Answered by Darksonn
stsydow asked this question in Q&A
Discussion options

You must be logged in to vote

I just discovered the AsyncFD issue #2903 and mio::unix, which is at least a good base for Unix File I/O.

No, it cannot be used with file IO. It might seem like it would work, but the underlying OS primitives don't work with files.

And there is also async_fs (using an extra I/O thread) - which is better at least than the current approach.

This is the current approach. In fact, having another look at your code, it seems like you only use read and write (and wrappers of those two) which in fact bypass the mutex entirely using Mutex::get_mut, so it's surprising that you see the increased usage of mutex. I guess that the issue deserves another look, because the mutex that was introduced in

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by stsydow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants