Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency in the document of std::sync::Mutex #40176

Closed
topecongiro opened this issue Mar 1, 2017 · 1 comment
Closed

Inconsistency in the document of std::sync::Mutex #40176

topecongiro opened this issue Mar 1, 2017 · 1 comment
Assignees
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools P-high High priority

Comments

@topecongiro
Copy link
Contributor

In the document of std::sync::Mutex, lock and mutex are used interchangeably.
For example, the document of lock() is as follows:

/// This function will block the local thread until it is available to acquire
/// the mutex. Upon returning, the thread is the only thread with the mutex
/// held. An RAII guard is returned to allow scoped unlock of the lock. When
/// the guard goes out of scope, the mutex will be unlocked.

Here, the lock and the mutex are used to refer to the same Mutex object. As a non-native English speaker, this kind of inconsistency is somewhat confusing. This is especially the case for this document because lock also refers to the operation on the mutex object.

I do understand these two words are interchangable unless you are writing a thesis or the like. However, I feel that using them consistently throughout the document makes it more readable.

Therefore, I would like to suggest to use mutex to refer to the Mutex object, and lock or unlock to refer to the operations on the Mutex object.

e.g. An RAII guard is returned to allow scoped unlock of the mutex.

Sorry in advance if this inconsistency is intentional.

@steveklabnik steveklabnik added A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools and removed A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools labels Mar 10, 2017
@steveklabnik
Copy link
Member

docs team triage: @GuillaumeGomez is gonna take this one

@steveklabnik steveklabnik added the P-high High priority label Mar 15, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this issue Apr 3, 2017
…ncy, r=steveklabnik

Fix mutex's docs inconsistency

Fixes rust-lang#40176.

r? @steveklabnik
cc @rust-lang/docs
frewsxcv added a commit to frewsxcv/rust that referenced this issue Apr 3, 2017
…ncy, r=steveklabnik

Fix mutex's docs inconsistency

Fixes rust-lang#40176.

r? @steveklabnik
cc @rust-lang/docs
frewsxcv added a commit to frewsxcv/rust that referenced this issue Apr 4, 2017
…ncy, r=steveklabnik

Fix mutex's docs inconsistency

Fixes rust-lang#40176.

r? @steveklabnik
cc @rust-lang/docs
frewsxcv added a commit to frewsxcv/rust that referenced this issue Apr 4, 2017
…ncy, r=steveklabnik

Fix mutex's docs inconsistency

Fixes rust-lang#40176.

r? @steveklabnik
cc @rust-lang/docs
frewsxcv added a commit to frewsxcv/rust that referenced this issue Apr 5, 2017
…ncy, r=steveklabnik

Fix mutex's docs inconsistency

Fixes rust-lang#40176.

r? @steveklabnik
cc @rust-lang/docs
frewsxcv added a commit to frewsxcv/rust that referenced this issue Apr 5, 2017
…ncy, r=steveklabnik

Fix mutex's docs inconsistency

Fixes rust-lang#40176.

r? @steveklabnik
cc @rust-lang/docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools P-high High priority
Projects
None yet
Development

No branches or pull requests

3 participants