Hacker News new | ask | show | jobs
by H8crilA 2491 days 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.