Skip to content

Incorrect grammar in File lock-related methods #145180

@LeandroVandari

Description

@LeandroVandari

Location

File::lock, File::try_lock, File::lock_shared, File::try_lock_shared

Summary

The recently stabilized lock-related methods for File have some grammatical errors.

1. All of the methods

If this file handle/descriptor, or a clone of it, already holds an lock [...]

Since lock starts with a consonant, the preceding article should be a.

Additionally, all of the methods refer to

acquire a [...] lock on the file

As I'm not a native english speaker, I'm not sure if this is correct, but it seems to me that

acquire a [...] lock to the file

is much more natural.

2. File::lock and File::try_lock

If the file not open for writing

should be

If the file is not open for writing

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions