-
-
Notifications
You must be signed in to change notification settings - Fork 15k
The comment about the weak field in ArcArcInner is imprecise #144296
Copy link
Copy link
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.
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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
By examining the implementation of
Weak::upgrade, it becomes apparent that the operation does not verify whether theweakis locked or not. It just verifies whether thestrongis zero or not. So, "locking the ability to upgrade weak pointers" sounds like the operation cannot succeed ifweakis locked. IIUC, the actual intent should be that the success of the locking indicates that no other weak pointers exist, so it's impossible that there is a potential concurrentupgradeoperation.The suggested comment might be: