Which is threadsafe atomic or non atomic?

前端 未结 7 1788
广开言路
广开言路 2020-12-02 07:05

I searched and found immutable are thread safe while mutable is not. This is fine. But i got misleading notes, blogs, answers about atomic vs non-atomic about thread safety,

7条回答
  •  再見小時候
    2020-12-02 07:57

    You should consider implementing a locking mechanism so you don't get deadlock within your app. Also if you are implementing Core data you should read up on iOS thread safety.

    See.

    http://developer.apple.com/library/iOS/#documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html

    http://developer.apple.com/library/iOS/#documentation/Cocoa/Conceptual/Multithreading/ThreadSafety/ThreadSafety.html%23//apple_ref/doc/uid/10000057i-CH8-SW1

提交回复
热议问题