Created
December 14, 2014 08:26
-
-
Save djkskqyr3/aaf9c91f72658ff16fe1 to your computer and use it in GitHub Desktop.
Revisions
-
James Chan created this gist
Dec 14, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ 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".