3 ms·
Yup, it's a data race (and therefore UB) to access the same memory from two different threads without synchronizing instructions (like mutexes, thread start/joi
by H8crilA 7y ago
Yup, it's a data race (and therefore UB) to access the same memory from two different threads without synchronizing instructions (like mutexes, thread start/join, atomics).
It is allowed to concurrently read from const regions. But not concurrently read and write, and definitely not concurrently write.