-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: 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.Relevant to the library team, which will review and decide on the PR/issue.
Description
Location
Summary
The docs for RwLock::try_write say:
This function will return the WouldBlock error if the
RwLockcould not be acquired because it was already locked exclusively.
I believe it should say "because it already has a shared or exclusive lock", based on how RwLock works (and based on my reading of the code). The sibling methods (read, write) clarify this detail correctly, and try_write's docs appear to be copied from try_read (where this description is correct), so I think this is just a small oversight from copying the description.
(For context, I was initially checking whether RwLock had some way to indicate that the lock was writer-locked, and this description confused me at first.)
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: 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.Relevant to the library team, which will review and decide on the PR/issue.