If two threads try to write to the same address at the same time, is the value after the concurrent write guaranteed to be one of the values that the threads tried to write? or is it possible to get a combination of the bits?
Also, is it possible for another thread to read the memory address while the bits are in an unstable state?
I guess what the question boils down to is if a read or write to a single memory address is atomic at the hardware level.
I think this all depends on the "memory model" for your particular programming language or system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With