Is it possible that a store with memory_order_relaxed never reaches other threads?
问题 Suppose I have a thread A that writes to an atomic_int x = 0; , using x.store(1, std::memory_order_relaxed); . Without any other synchronization methods, how long would it take before other threads can see this, using x.load(std::memory_order_relaxed); ? Is it possible that the value written to x stays entirely thread-local given the current definition of the C/C++ memory model that the standard gives? The practical case that I have at hand is where a thread B reads an atomic_bool frequently