Thread Safe

Thread Safe

Thread safe code can be safely called from multiple threads or concurrent tasks without causing any problems (data corruption, crashing, etc). Code that is not thread safe must only be run in one context at a time. An example of thread safe code is NSDictionary. You can use it from multiple threads at the same time without issue. On the other hand, NSMutableDictionary is not thread safe and should only be accessed from one thread at a time.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 宅了大半天突然在收拾完屋子后临时决定回家,嗯,堂哥明天结婚,姐姐妹妹都回家了。其实这样的机会真的要好好珍惜,...
    我是手心阅读 1,911评论 0 1
  • 原文:http://www.docin.com/p-721844449.html
    lltree阅读 4,106评论 0 0
  • 时间是一片湖,安静的波澜不惊, 时间是一条河,安静的流淌着, 时间是一段江,激情地翻涌, 时间是一片海,潮来潮往,...
    魔使阅读 1,690评论 0 0
  • 生活不只是眼前的苟且,还有诗和远方。眼前的苟且是现实,是常态。诗和远方是梦境,具有很大的不确定性。应将更多的时间和...
    冷暖吾知阅读 1,079评论 0 0
  • 贪 我在红尘中打坐 你执菩提经过 拈花一笑从容不迫 那经文被你读到月落 而我掌心里攥着 尘世的烟火 放也是错,留也...
    杜兹肺魚阅读 5,045评论 18 25