问题
Lets say I have an application that is writing to a boolean from one thread and reading from the same boolean from another thread.
I don't care if my reading thread reads a stale value. Is this safe on all ARM cores and x86? I don't want to run into an issue were a partially written value is read by my reading thread.
Follow up question: Which swift types have guaranteed atomic reads and writes on x86 and ARM?
来源:https://stackoverflow.com/questions/37932737/are-boolean-reads-and-writes-guaranteed-atomic-in-swift