Skip to content
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

Fine-tune the Ordering for num_senders #2833

Open
wang384670111 opened this issue Mar 2, 2024 · 0 comments
Open

Fine-tune the Ordering for num_senders #2833

wang384670111 opened this issue Mar 2, 2024 · 0 comments

Comments

@wang384670111
Copy link

num_senders: AtomicUsize,

As mentioned in the comments, num_senders is used only for counting purposes, not for synchronizing access to other shared variables. While SeqCst guarantees the correctness of the program, it can also affect the performance. Therefore, using Relaxed is sufficient to maintain the correctness of the program without affecting its efficiency.

ed3b268 Could you please explain the reasoning behind the need to switch to seqcst?

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

No branches or pull requests

1 participant