Open
Description
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
- Implementation: Implement file_lock feature #130999
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.