IT lexicon › Programming › Synchronizes-with

Synchronizes-with

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

A relation between memory operations that guarantees a write is visible to a subsequent read on another thread.

Synchronizes-with is central to memory models. It establishes ordering relations between instructions on different threads through certain operations—typically mutex locks, atomic operations with explicit semantics, or memory barriers. If operation A synchronizes-with operation B, all changes before A are guaranteed visible when B executes. This is fundamental to preventing data races and builds on the happens-before relation.

Without synchronizes-with guarantees, compilers and processors can reorder instructions freely, and changes on one thread never become visible to others. With it, you ensure critical sections work correctly without global barriers.

← Back to the lexicon