You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xmh0511 opened this issue
Nov 11, 2024
· 2 comments
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.
Calls to park synchronize-with calls to unpark, meaning that memory operations performed before a call to unpark are made visible to the thread that consumes the token and returns from park.
In atomic ordering terms, unpark performs a Release operation and park performs the corresponding Acquire operation. Calls to unpark for the same thread form a release sequence.
Since the memory order in Rust is from C++, in C++ standard, [atomics.order] p2 says:
An atomic operation A that performs a release operation on an atomic object M synchronizes with an atomic operation B that performs an acquire operation on M and takes its value from any side effect in the release sequence headed by A.
Since unpark performs a Release operation and park performs the corresponding Acquire operation, by the definition of the wording synchronizes with, we should say
calls to unpark synchronize-with calls to park.
Summary
calls to unpark synchronize-with calls to park.
because a release store operation synchronize with an acquire load operation
The text was updated successfully, but these errors were encountered:
xmh0511
added
the
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
label
Nov 11, 2024
jieyouxu
added
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Nov 11, 2024
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.
Location
In the document park
Since the memory order in Rust is from C++, in C++ standard, [atomics.order] p2 says:
Since unpark performs a Release operation and park performs the corresponding Acquire operation, by the definition of the wording synchronizes with, we should say
Summary
because a release store operation synchronize with an acquire load operation
The text was updated successfully, but these errors were encountered: