Skip to content

Fix two unnecessary seq_cst memory orderings#3

Closed
trns1997 wants to merge 1 commit intomainfrom
fix/unnecessary-seq-cst
Closed

Fix two unnecessary seq_cst memory orderings#3
trns1997 wants to merge 1 commit intomainfrom
fix/unnecessary-seq-cst

Conversation

@trns1997
Copy link
Copy Markdown
Collaborator

Summary

  • reclaim_orphaned_slots (Region.cc): replace implicit seq_cst atomic, load with explicit .load(relaxed) — function requires full quiescence.
  • drain_unconsumed (Subscriber.cc): downgrade seq_cststore torelease— drain only runs afterif (quiesced)`, so no publisher is concurrently admitted.

Eliminates unnecessary full memory barriers :)

@leducp
Copy link
Copy Markdown
Owner

leducp commented Apr 14, 2026

This is outside of the hot path and it is always tricky to validate the correctness so I'll keep it as-is.

@leducp leducp closed this Apr 14, 2026
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.

2 participants