NSUserDefault线程安全吗?

编程入门 行业动态 更新时间:2024-10-23 04:40:47
本文介绍了NSUserDefault线程安全吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

developer.apple. com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/Reference/Reference.html 说是

...应通过禁用任何功能来防止用户编辑该首选项 适当的控件.

...should prevent users from editing that preference by disabling any appropriate controls.

NSUserDefaults类是线程安全的. NSURL和 文件参考网址...

The NSUserDefaults class is thread-safe. Persistence of NSURL and file reference URLs...

经过长时间的讨论,事实并非如此

This long discussion says it isn't

www.cocoabuilder/archive/cocoa/155227-nsuserdefaults -thread-safety.html

那么哪个是对的?还有为什么意见分歧.

So which one is right? Also why the difference of opinion.

推荐答案

Apple iOS 5.1和OS X 10.7文档说它是线程安全的.因此它是线程安全的.

The Apple iOS 5.1 and OS X 10.7 documentation say that it is thread-safe; therefore it is thread-safe.

更多推荐

NSUserDefault线程安全吗?

本文发布于:2023-11-25 18:55:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1630934.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:线程   NSUserDefault

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!