-
I'm have ported my code from v0.1 to v0.3 it feels not good
My expectation was that tokio is the "batteries included solution" for async processing. I just discovered the AsyncFD issue #2903 and mio::unix, which is at least a good base for Unix File I/O. I'm willing to contribute, but the code is so complex already that I would appreciate some hints how to approach it and what to expect. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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.
This is the current approach. In fact, having another look at your code, it seems like you only use |
Beta Was this translation helpful? Give feedback.
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.
This is the current approach. In fact, having another look at your code, it seems like you only use
read
andwrite
(and wrappers of those two) which in fact bypass the mutex entirely usingMutex::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 …