Skip to content

Is content of chapter 7 Release/Acquire model correct???? #174

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

Closed
FischLu opened this issue Mar 8, 2021 · 1 comment
Closed

Is content of chapter 7 Release/Acquire model correct???? #174

FischLu opened this issue Mar 8, 2021 · 1 comment

Comments

@FischLu
Copy link

FischLu commented Mar 8, 2021

Actual Description

  • File Path: 07-thread.md
  • Original paragraph:

As you can see, std::memory_order_release ensures that the write behavior after it does not occur before the release operation, which is a forward barrier, and std::memory_order_acquire ensures that its previous write behavior does not occur after this acquisition operation, there is a backward barrier.

Expected Description

according to cppreference, I think this description is the other way around, which should be:

As you can see, std::memory_order_release ensures that the write behavior before it does not occur after the release operation, which is a backward barrier, and std::memory_order_acquire ensures that its subsequent read/write behavior does not occur before this acquisition operation, which is a forward barrier.

@changkun
Copy link
Owner

changkun commented Mar 8, 2021

Previously reported in #159. (Needs a careful review on this.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants