2.4.2.4.1. Example: Causality Loops With Happens-Before Consistency
int A = 0;
int B = 0;

Executed in one thread:

if (A == 1) B = 1;

Executed in another thread:

if (B == 1) A = 1;

Example adjusted from literature, see references.