a = 0; c = 0; thread 1: { a = 1; c.store(3, memory_order_release); } thread 2: { while (c.load(memory_order_consume) != 3) ; assert(a == 1); // assert 可能失败也可能不失败 }