Skip to main content

4 docs tagged with "synchronization"

View all tags

C++ Memory Model

The C++ memory model defines how threads interact through memory, including visibility of writes, ordering of operations, and synchronization primitives.

Condition Variables

Condition variables allow threads to wait for specific conditions to become true, enabling efficient thread coordination beyond simple mutexes.

Data Races and Race Conditions

A data race occurs when two or more threads access the same memory location concurrently, at least one access is a write, and there's no synchronization between them. Data races cause undefined behavior.

Mutexes and Locks

A mutex (mutual exclusion) is a synchronization primitive that protects shared data by allowing only one thread to access it at a time.