Tracking Issue for File lock API (original) (raw)

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; fn try_lock_shared(&self) -> io::Result; fn unlock(&self) -> io::Result<()>; }

Steps / History

Unresolved Questions

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html