nonatomic property in model class when using NSOperationQueue (iPhone)?
Posted
by Andrew B.
on Stack Overflow
See other posts from Stack Overflow
or by Andrew B.
Published on 2010-06-04T22:58:22Z
Indexed on
2010/06/05
8:32 UTC
Read the original article
Hit count: 199
I have a custom model class with an NSMutableData ivar that will be accessed by custom NSOperation subclasses (using an NSOperationQueue). I think I can guarantee thread-safe access to the ivar from multiple NSOperations by using dependencies, and I can guarantee that I don't access the ivar from other code (say my main app thread) by waiting until the Q has finished all operations.
Should I use a nonatomic property specification, or leave it atomic? Is there a significant impact on performance?
© Stack Overflow or respective owner