-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support positional vectored IO for unix files #71055
Comments
Windows actually does not support vectored reads and writes for anything other than sockets, so |
@retep998 Thanks for the clarification. In that case this could indeed be implemented for Windows as well. I suppose the next step would be an RFC? |
Positional reading/writing on Windows has the unfortunate effect of modifying the file offset cursor. IIRC the |
Citing from Linux man page, Further, " For non-POSIX standard API, it's better to reside in an external crate rather than in the std as suggested (in somewhere else I cannot find now). Libc already provides this syscall function, and nix provides a pretty wrapper function around it. I guess we could have a |
Next to the existing
write_vectored
andread_vectored
APIs, it would be great to havewrite_vectored_at
andread_vectored_at
methods forFile
s on UNIX systems, corresponding to thepwritev
andpreadv
syscalls. This would be an easy way to add means for high performance file IO using the standard libraryFile
type.As far as I understand, the equivalent does not exist on Windows, so this would probably have to live in the unix
FileExt
trait.If this is deemed desirable, I'd be happy to send a PR for this.
The text was updated successfully, but these errors were encountered: