How I want to simplify async filesystem APIs... 1/13
They're not Linux-only - read_at/write_at exist on all Unix systems, including macOS/iOS/Android/etc. And Windows has similar functions called seek_read/seek_write: https://doc.rust-lang.org/std/os/windows/fs/trait.FileExt.html#tymethod.seek_read … https://doc.rust-lang.org/std/os/windows/fs/trait.FileExt.html#tymethod.seek_write …
-
-
I feel the concept of file cursors and seeking is an old C-ism that requires locking on the OS level and prohibits parallelism. It makes files stateful and is why File implementations in async-std/tokio are so complicated.
-
Correct me if I'm wrong, but I believe modern databases have switched to read_at/write_at/seek_read/seek_write and don't really use cursors? Perhaps
@sadisticsystems could chime in... - 1 more reply
New conversation -
-
-
Oh yeah, my bad: Unix. But that presents two choices: either drop Windows (or Unix) support. Or cfg_if between the two. There probably should be a cross-platform variant, perhaps that *is* Seek, but in its absence the end-user experience is not good enough to drop Seek rn.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.