IT lexicon › Programming › Seq-Cst

Seq-Cst

Programming På svenska → Updated: 2026-11-15

An atomic operation with the strongest memory consistency guarantee—all threads see the same total order of all changes.

Seq-Cst (sequential consistency) is the strongest consistency guarantee you can place on a single atomic operation. It forces the processor to treat it as if it runs to completion before the next instruction starts, and every other thread must see the same total order on all Seq-Cst operations. The cost is performance overhead: it typically requires full memory barriers under the hood.

In C++, this is the default atomic memory order (`memory_order_seq_cst`). It's the safest but slowest. For performance-critical code, developers often use weaker guarantees like acquire-release, but Seq-Cst is insurance against subtle memory model bugs.

← Back to the lexicon