Home > DeveloperSection > Interviews > What is difference between atomic and nonatomic property specifier?

Posted on    April-21-2015 1:19 AM

 iPhone iPhone  Ios 
 1 Answer(s)
  1934  View(s)
Rate this:

Sunil Singh
Sunil Singh

Total Post:167

Posted on    April-21-2015 1:19 AM

Atomic means only one thread access the variable but nonatomic means multiple thread access the variable .Atomic is thread safe but nonatomic is thread unsafe.Atomic is fast in performance but nonatomic  is slow in performance.Atomic is default behavior but nonatomic is not default behavior . we need to add nonatomic keyword in property attribute. Nonatomic may result in unexpected behavior, when two different process (threads) access the same variable at the same time.

Don't want to miss updates? Please click the below button!

Follow MindStick