objective c - Rule of thumb for @property atomicity? -


Is there a good rule of thumb when Object-C (on the desktop or on the iPhone) platform, as the default atom Contrary to the qualities? I understand the difference - atomicity guarantees a full value at the expense of performance - but in most instances I see the use of non-temporal properties (and not unstable), so clearly in such circumstances the atom is required and the circumstances It does not have it.

Should I use atomic qualities and when I should support non-regular people then can I provide some simple guideline?

Whenever possible you nonatomic , this means that Properties which will only be set / accessed from a thread or property whose access is protected by any kind of high-level synchronization. It is important to note that the use of property does not guarantee yarn protection in other words algorithms, which depend on the values ​​of the properties of the atom , their system Keeping this thing in mind, the thread should be safe to secure the thread, while maintaining the thread's security of the system, it is often possible to create the properties as nonatomic .


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -