-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add a file locking API to std::io::fs #11213
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
Comments
It doesn't look like libuv currently has support for this, so this would probably involve adding support for a locking API to libuv as well. Sounds like a good idea though! |
File locking is a disaster, and doesn't really work properly:
The semantics aren't going to be portable across operating systems, because POSIX locks are unusable. The BSD locking API is somewhat sane, but I don't think you're going to find a 1:1 equivalent on Windows. |
I also think that locking is too unportable to put in std. |
If this is too unportable to be implemented, should this be closed? |
Yes, it sounds like this shouldn't be added to libstd at this time. |
check that the types are equal in `SpanlessEq::eq_expr` Fixes rust-lang#11213 changelog: [`if_same_then_else`]: don't lint for integer literals of different types
Some sort of portable advisory file locking API would be useful to me.
Perhaps like http://www.php.net/manual/en/function.flock.php.
I can look into sending a pull request if there are no objections.
The text was updated successfully, but these errors were encountered: