Feature gate: #![feature(file_lock)]
This is a tracking issue for rust-lang/libs-team#412
This feature exposes advisory file locks on File. They allow a file handle to acquire an exclusive or shared file lock, which blocks other file handles to the same file from acquiring a conflicting lock. Some semantics are platform dependent, and these are documented in the API documentation.
Public API
impl File {
fn lock(&self) -> io::Result<()>;
fn lock_shared(&self) -> io::Result<()>;
fn try_lock(&self) -> io::Result<bool>;
fn try_lock_shared(&self) -> io::Result<bool>;
fn unlock(&self) -> io::Result<()>;
}
Steps / History
Unresolved Questions
Feature gate:
#![feature(file_lock)]This is a tracking issue for rust-lang/libs-team#412
This feature exposes advisory file locks on
File. They allow a file handle to acquire an exclusive or shared file lock, which blocks other file handles to the same file from acquiring a conflicting lock. Some semantics are platform dependent, and these are documented in the API documentation.Public API
Steps / History
Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩