c = 0; thread 1: { a = 1; b.store(2, memory_order_relaxed); c.store(3, memory_order_release); } thread 2: { while (c.load(memory_order_acquire) != 3) ; // 以下 assert 永远不会失败 assert(a == 1 && b == 2); assert(b.load(memory_order_relaxed) == 2); }