# Fence-fence synchronization using SeqCst memory ordering

**URL:** <https://users.rust-lang.org/t/fence-fence-synchronization-using-seqcst-memory-ordering/141105>\
**Category:** help\
**Created:** [July 6, 2026, 6:49am UTC](https://users.rust-lang.org/t/fence-fence-synchronization-using-seqcst-memory-ordering/141105 "2026-07-06T06:49:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![manganhedenbergite](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/manganhedenbergite/32/51400_2.png) [@manganhedenbergite](https://users.rust-lang.org/u/manganhedenbergite)\
**Post date:** [July 6, 2026, 6:49am UTC](https://users.rust-lang.org/t/fence-fence-synchronization-using-seqcst-memory-ordering/141105/1 "2026-07-06T06:49:28Z")

</div>

can anyone please explain with an example how to synchronize with two SeqCst fences? how to sequence instructions: whether the instruction comes first or the fence?

---

<div class="post-metadata">

**Author:** ![riking](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/riking/32/2351_2.png) [@riking](https://users.rust-lang.org/u/riking)\
**Post date:** [July 7, 2026, 5:58am UTC](https://users.rust-lang.org/t/fence-fence-synchronization-using-seqcst-memory-ordering/141105/2 "2026-07-07T05:58:28Z")

</div>

In general, as an algorithm and data structure designer, you want to be using Release-Acquire pairs of stores and loads. It is a very rare algorithm that actually _needs_ SeqCst.

As an end user, you want to be using data structures like channels and mutexes that have already taken care of synchronization for you.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/system/32/51372_2.png) [@system](https://users.rust-lang.org/u/system)\
**Post date:** [October 5, 2026, 5:59am UTC](https://users.rust-lang.org/t/fence-fence-synchronization-using-seqcst-memory-ordering/141105/3 "2026-10-05T05:59:20Z")

</div>

Closed on October 5, 2026, 5:59am UTC

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.
