Objective C,同步
@Syncronized(nodeMode.neighborNodeListeners) //neighborNodeListeners is NSMutalble array
假设我将 neighborNodeListeners 设置为“
@property(retain) NSMutableArray *neighborNodeListeners
我还需要同步块吗?” “neighborNodeListeners”将被多个线程访问
@Syncronized(nodeMode.neighborNodeListeners) //neighborNodeListeners is NSMutalble array
Lets say I set neighborNodeListeners as
@property(retain) NSMutableArray *neighborNodeListeners
Do I still need the Syncronized block? "neighborNodeListeners" will be accessed by multiple threads
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为没有必要。默认属性是
atomic
。I think its not needed. Default property is
atomic
.