Besides, this PR also tried use read_at and write_at to avoid locking a fd. But currently tokio doesn't support read_at or write_at for now. So, it's needed to use tokio::task::spawn_blocking with std::fs::File and communicate with tokio::sync::oneshot. But after benching the approach, it's found that the jitter of the latency is extremely high. So I abandon the implementation. You can found them in the commit logs if you are interested.
What changes were proposed in this pull request?
As titled.
Besides, this PR also tried use
read_at
andwrite_at
to avoid locking a fd. But currentlytokio
doesn't supportread_at
orwrite_at
for now. So, it's needed to usetokio::task::spawn_blocking
withstd::fs::File
and communicate withtokio::sync::oneshot
. But after benching the approach, it's found that the jitter of the latency is extremely high. So I abandon the implementation. You can found them in the commit logs if you are interested.Which issues is this PR related to?
160