Created
December 14, 2014 08:26
-
-
Save djkskqyr3/aaf9c91f72658ff16fe1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With "atomic", the synthesized setter/getter will ensure that a whole value is always returned from the getter or set by the setter, regardless of setter activity on any other thread. That is, if thread A is in the middle of the getter while thread B calls the setter, an actual viable value -- an autoreleased object, most likely -- will be returned to the caller in A. | |
In nonatomic, no such guarantees are made. Thus, nonatomic is considerably faster than "atomic". |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment