Skip to content

Conversation

nazar-pc
Copy link
Contributor

No description provided.

Copy link
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution.

AcqRel is a valid Ordering, can you elaborate on why SeqCst is better here?

@nazar-pc
Copy link
Contributor Author

It is not better, AcqRel is not valid for both for load and store operations. You will get panic "there is no such thing as an acquire/release load" in runtime.
It can be used for things like swap or compare_and_swap where you combine load and store in one call.
SeqCst is just a safe default, especially for examples.

Copy link
Contributor

@niklasad1 niklasad1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants