WHAT IS DIFFERENCE BETWEEN ATOMIC AND NONATOMIC PROPERTY SPECIFIER?

Sunil Singh

Total Post:167

Points:835
Posted by  Sunil Singh
iPhone  Ios 
 2097  View(s)
Ratings:
Rate this:
  1. Sunil Singh

    Post:167

    Points:835
    What is difference between atomic and nonatomic property specifier?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!