Skip to content

File::lock docs don't make clear they are cross-process #153618

@Mark-Simulacrum

Description

@Mark-Simulacrum

Location (URL)

https://doc.rust-lang.org/nightly/std/fs/struct.File.html#method.lock

Summary

The current documentation doesn't mention "process" in the lock/lock_shared methods at all. The only clue without either prior knowledge or reading the man pages that these methods do work across processes is this line:

This acquires an exclusive lock; no other file handle to this file may acquire another lock.

But this requires understanding what relation a file handle has to the file, etc. We should make the use for these methods clearer to readers.

Metadata

Metadata

Assignees

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions